1

I am new to solidity, truffle and i tried react-box from Truffle and i get the following error. I am using Macos.

Here is the basic steps

    npm install -g truffle
    truffle develop
    compile
    migrate

https://github.com/truffle-box/react-box

Module not found: Can't resolve './contracts/SimpleStorage.json'

  • On which step do you get that error? – shane Sep 1 '18 at 18:56
2

Had the same error. It appears that a dependency is not included in node_modules when using truffle unbox react.

Just install the missing dependency and the error will go away: npm install bignumber.js

1

For me, this answer solved the problem. Specifically tmcinerney4's answer where he suggests upgrading your truffle.

cd /usr/local/lib/node_modules/truffle/
yarn add solc
0

Error might be because of
1. contract is not compiled and migrated.
2. symlink, try running 'npm run link-contracts' from client folder.

For me step 2 solved the issue. Please refer https://github.com/truffle-box/react-box/issues/68

0

If you have compiled the solidity script, it should generate the ABI file in contracts folder. Verify of the files are present in the contracts folder at the root. If not, run the truffle migrate again. The contracts folder inside the client should be symlinked to root contracts folder. If you are using windows, you might face symlink issue. Please refer to this issue in the GitHub for the solution.

https://github.com/truffle-box/react-box/issues/68

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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