ethereum / solc-js

Javascript bindings for the Solidity compiler
https://soliditylang.org
MIT License
1.45k stars 474 forks source link

solc-select is out of date. Please run `solc-select upgrade` #707

Closed enderphan94 closed 1 year ago

enderphan94 commented 1 year ago

I'm using MacOS M2, after installing solc via node and I got this error

solc --version                                                  
Traceback (most recent call last):
  File "/usr/local/bin/solc", line 8, in <module>
    sys.exit(solc())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solc_select/__main__.py", line 91, in solc
    halt_old_architecture(path)
  File "/usr/local/lib/python3.11/site-packages/solc_select/solc_select.py", line 30, in halt_old_architecture
    raise argparse.ArgumentTypeError(
argparse.ArgumentTypeError: solc-select is out of date. Please run `solc-select upgrade`

I've installed solc-select via pip3

Name: solc-select
Version: 1.0.4
Summary: Manage multiple Solidity compiler versions.
Home-page: https://github.com/crytic/solc-select
Author: Trail of Bits
Author-email: 
License: AGPL-3.0
Location: /opt/homebrew/lib/python3.11/site-packages
Requires: packaging, pycryptodome
Required-by:
cameel commented 1 year ago

Looks like you have solc-select installed globally and it runs when you invoke solc. This message is not coming from solc installed via npm.

In fact solc-js does not provide a solc binary at all. It contains an emscripten binary that has no CLI interface. To use it on the command line you try npx solcjs --version, but overall for command-line use I recommend using a native binary.