Using wrong solc dependency
See original GitHub issueI’m seeing this error when looking at the code in this repo::
Source file requires different compiler version (current compiler is 0.6.1+commit.e6f7d5a4.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
When I run npm ls solc
in that directory, I see:
$ npm ls solc
niftyswap@0.1.3 /Users/primary/Projects/Audits/horizon-games-audit-2020-02/code/niftyswap
├─┬ ganache-core@2.10.1
│ └── solc@0.6.1 extraneous
└── solc@0.5.16
npm ERR! extraneous: solc@0.6.1 /Users/primary/Projects/Audits/horizon-games-audit-2020-02/code/niftyswap/node_modules/ganache-core/node_modules/solc
I can’t find solidity 0.6.1 installed anywhere else on my machine. It seems that you’re somehow finding the wrong solc dependency.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Solidity version mismatch - truffle
sol:1:1: ParserError: Source file requires different compiler version (current compiler is 0.5.16+commit.9c3226ce.Emscripten.clang - note that ...
Read more >Cant compile solidity files using correct Solc version
I get thrown an error saying all my files require a higher pragma solidity version, in the error it says I'm currently using...
Read more >Hardhat errors | Ethereum development environment for ...
#Hardhat errors. This section contains a list of all the possible errors you may encounter when using Hardhat and an explanation of each...
Read more >solc | Yarn - Package Manager
Fast, reliable, and secure dependency management. ... Uses the Emscripten compiled Solidity found in the solc-bin repository.
Read more >Compile contracts - Truffle Suite
You should not edit these files as they'll be overwritten by contract compilation and deployment. Dependencies¶. You can declare contract dependencies using ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks FWIW, I’ve found the dropdown selector super helpful since you added it. 😃
Would it be possible to also allow choosing the compiler version from a dropdown in the command pallete?