Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Tutorial is deprecated, needs to be updated #20

Open
pynchmeister opened this issue Aug 7, 2020 · 4 comments
Open

Tutorial is deprecated, needs to be updated #20

pynchmeister opened this issue Aug 7, 2020 · 4 comments

Comments

@pynchmeister
Copy link

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.

@HaymanLiron
Copy link

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
Copy link

HaymanLiron commented Aug 27, 2020

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
Copy link

@pynchmeister please let me know if these helps you

@pynchmeister
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants