tutorialtoken-box icon indicating copy to clipboard operation
tutorialtoken-box copied to clipboard

Tutorial is deprecated, needs to be updated

Open pynchmeister opened this issue 4 years ago • 4 comments

Going through the tutorial yesterday as a learning resource, I ran into several issues. I will revisit this issue when I have a moment and describe all that failed.

pynchmeister avatar Aug 07 '20 14:08 pynchmeister

I can leave details

npm install -g truffle truffle version

Output: Truffle v5.1.41 (core: 5.1.41) Solidity v0.5.16 (solc-js) Node v14.4.0 Web3.js v1.2.1

truffle unbox tutorialtoken Then when I compile, I get this error:

Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify "pragma solidity ^0.4.24".

I tried to fix it by changing the solc compiler version, but this caused other bugs. I am new to all of this so I'm not really sure how to fix it. If I do fix it then I can open a pull request.

HaymanLiron avatar Aug 27 '20 18:08 HaymanLiron

OK the following two changes made it work for me:

Firstly, make sure that you are not using the latest version of openzeppelin-solidity For example, install version 2.x npm install [email protected]

Secondly, make sure that solc version is in the 0.4.x range Do this by editing the truffle.js file and adding the following section:

compilers: {
    solc: {
      version: "^0.4.0", 
      parser: "solcjs"  
    }
 } 

HaymanLiron avatar Aug 27 '20 18:08 HaymanLiron

@pynchmeister please let me know if these helps you

HaymanLiron avatar Aug 27 '20 18:08 HaymanLiron

Hello @HaymanLiron thanks for the suggestions. I did as you advised and I am still receiving an error after running truffle compile:

TypeError [ERR_INVALID_REPL_INPUT]: Listeners for `uncaughtException` cannot be used in the REPL

pynchmeister avatar Sep 09 '20 12:09 pynchmeister