If you are trying to go through the token tutorial by Truffle there are a few things to note.

If you follow the instructions fully, it will not work. Firstly the pragma version needs to be updated from 0.4.24 to 0.5.0. This is because if you install Truffle, it will install the latest version of solc, the solidity compiler which will be 0.5.8 at this time of writing.

Next, if you run “npm run dev”, you might encounter and error like ERR! tutorialtoken@1.0.0 dev: `lite-server`. If you do, you’ll want to fix it by doing this.

Then you’ll want to make sure that Metamask is either not yet installed or that it is disabled. Otherwise the tokens will appear in Metamask instead of on the webpage.

Finally, you need to change the port in app.js from 9545 to 7545 which is the Ganache port.

The tutorial is great but is several years old so needs these modifications.

Leave a Reply

Your email address will not be published. Required fields are marked *