0

I'm trying to figure out an issue with this tutorial that i'm following, whenever I try to use truffle test within the CMD in the defi-tutorial folder, it comes up with the issue in the header, cannot find module react-bootstrap/lib/breadcrumb. Here is the tutorial that i'm following: https://www.youtube.com/watch?v=CgXQC4dbGUE&list=PLS5SEs8ZftgUNcUVXtn2KXiE1Ui9B5UrY

The time of the error i'm experiencing is what he's doing at around 53:30

Here is the code i'm currently typing:


require("chai")
    .use(require("chai-as-promised"))
    .should()


contract("TokenFarm", (accounts) => {
    //Write tests here...
    describe("Mock DAI deployment", async () => {
        it("has a name", async () => {
            let daiToken = await DaiToken.new()
            const name = await daiToken.name()
            assert.equal(name, "Mock DAI Token")
        })
    })
})```
2
  • Did you install react-bootstrap (e.g. npm install react-bootstrap)?
    – Morten
    Jan 30 '21 at 14:12
  • I did! I just tried again to double check, and it all seems to be installed :( Jan 30 '21 at 15:13
1

I had the same issue for that tutorial looks like once the test is ran it adds an import for react-bootstrap/lib/Breadcrumb. I just removed the import and reran the test and it worked.

0

In your test, check if your editor changed it to item and imported the { Item } from react-bootstrap. Visual Code Studio did that to me.

Not the answer you're looking for? Browse other questions tagged or ask your own question.