question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using wrong solc dependency

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
maureliancommented, Jan 7, 2021

Thanks FWIW, I’ve found the dropdown selector super helpful since you added it. 😃

1reaction
maureliancommented, Mar 15, 2020

Would it be possible to also allow choosing the compiler version from a dropdown in the command pallete?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found