Reputation: 39
I am having a problem where truffle is still using old solidity compiler (- solc: 0.5.16+commit.9c3226ce.Emscripten.clang) even though i specified in my truffle-config.js to use version: '0.8.4'.
compilers: {
solc: {
version: '0.8.4',
},
},
to run truffle i use npx truffle
, my npx truffle -v
give the following:
Truffle v5.5.28 (core: 5.5.28) Ganache v7.4.0 Solidity v0.5.16 (solc-js) Node v14.16.1 Web3.js v1.7.4
i tried to reinstall truffle with @latest still same issue, tried to install solc latest version and still truffle isnt picking up the new solidity compiler
i also want to state that truffle init or any command don't work for me so i sue npx. could this be a reeason?
any help?
Upvotes: 2
Views: 605
Reputation: 39
I can't believe how dumb this was! I spend 4 hours fixing this and I stumbled upon this article https://github.com/trufflesuite/truffle/issues/5073
I had the
compilers: {
solc: {
version: '0.8.4',
},
},
inside the
networks: {
development: {
...
},
},
Don't ask me how!
This is insane. Anyways keep this here maybe someone like me or the person who posted about this too had the same issue.
Upvotes: 1