Using Truffle unbox react to unbox a boilerplate.

received the following error from running npm run start


  • Addition of "memory" parameters in the simpleStorage.sol
  • Changed unit to string in the simpleStorage.sol
  • Adjusted port address to "7545" to match Ganache's port.
  • Changed truffle-config to truffle.js for mac

Other than those changes, the boilerplate is still pretty much barebones.

Attempts for a solution:

  • Uninstalled and reinstalled -g and local truffle
  • Attempted multiple solutions for pragma requiring specific compiler to no avail. <- (I am sure this is probably the problem. However, me not being able to find this error searching all day tells me it could be something else before I even get to that.)
  • Attempted brew re-installation & updates from solc docs.
  • Updated Ganache to latest v.
  • Attempted optimizer & versions properties suggested for the compiler object in truffle.js.
  • Attempted complete wipes and resets and following the documentations for truffle unbox react documentation's step by step instead of other guides.

I would post the code, but literally re-attempting from a clean slate 3-4 times with most of these methods repeatedly already labels this code as barebones besides the subtle changes I listed.

2 Answers 2


My answer to this after having the latest Truffle framework and Solidity I did the following:

  • I had to manually update pragma versions for the default truffle unbox react .sol files.

  • Create a compiler object within the truffle.js (mac) or truffle-config.js (Windows naming convention.) for version control.

  • Make sure to check JSON files for compiler versions. I double check after creating a compiler object for the truffle configuration to make sure. (Its a bit extra, but all considerations of the support on this growing industry.)

Apart of the big confusion here to beware of is plug-ins. VS Code Solidity


I will have to get on gitter to inform him of the possible bug too. Beware as well other solidity plug-ins sometimes mentions a fork off of Juan Blanco's original plug-in.


This is because your App.js is attempting to set an int value to your storage variable which you changed to a string type.

In App.js change line 42 so that your contract.methods.set() call sets a string not an Int.q

Also should edit how storageValue is defined in the state definition in App.js from storageValue: 0 to storageValue: ""

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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