0

Using Truffle unbox react to unbox a boilerplate.

received the following error from running npm run start

Changes:

  • 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.

0

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

https://marketplace.visualstudio.com/items?itemName=JuanBlanco.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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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