Foundry – Resolving ZOE Error When Running Forge in Foundry
forgefoundry
I'm working with foundry. Forge seems to be installed but I get ZOE ERROR whenever I run it. Any idea why?
Best Answer
There is a conflict between forge as a package with ubuntu. When you run which forge in the terminal you get /usr/bin/forge which is not actually what we need. Instead, if you want to use forge /.foundry/bin/forge --version should definitely work.
Inorder to resolve the issue what you can do is add
alias forge='~/.foundry/bin/forge' in your ~/.bashrc file
remappings.txt is used by VSCode to remap the imports (Forge might use the remappings declared in foundry.toml, remappings.txt or lookup in ./lib/ without the need to manually declare them, which is what's happening here). Having forge-std/=lib/forge-std/src/ in remappings.txt will fix the VSCode integration (on a new line, without any quotation marks).
To quickly generate it, based on the toml or auto-generated one, you can use forge remappings > remappings.txt
Best Answer
There is a conflict between forge as a package with ubuntu. When you run
which forge
in the terminal you get/usr/bin/forge
which is not actually what we need. Instead, if you want to use forge/.foundry/bin/forge --version
should definitely work.Inorder to resolve the issue what you can do is add
alias forge='~/.foundry/bin/forge'
in your~/.bashrc
file