Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Message when forge not installed #54

Open
tynes opened this issue Jun 6, 2022 · 1 comment
Open

Error Message when forge not installed #54

tynes opened this issue Jun 6, 2022 · 1 comment

Comments

@tynes
Copy link
Collaborator

tynes commented Jun 6, 2022

The error message for hardhat compile when forge is not installed does not tell users this fact. This could help users debug the build process more easily. The following error is produced:

An unexpected error occurred:

TypeError: Cannot read properties of null (reading 'code')
    at analyzeModuleNotFoundError (/home/circleci/project/node_modules/hardhat/src/internal/core/config/config-loading.ts:161:13)
    at Environment.run (/home/circleci/project/node_modules/hardhat/src/internal/core/runtime-environment.ts:136:33)
    at async main (/home/circleci/project/node_modules/hardhat/src/internal/cli/cli.ts:218:5)
error Command failed with exit code 1.
@tynes
Copy link
Collaborator Author

tynes commented Jun 7, 2022

Following the above stack trace:

I would expect to see this in the logs but do not for some reason.

"Command failed. Is Foundry not installed? Consider installing via `curl -L https://foundry.paradigm.xyz | bash` and then running `foundryup` on a new terminal. For more context, check the installation instructions in the book: https://book.getfoundry.sh/getting-started/installation.html."

Devs are getting confused by the error message above and I'm trying to think of what is most convenient for an outside contributor when it comes to getting foundry. I don't love the idea of a postinstall hook that uses easyfoundryup if forge isn't in the PATH when calling yarn in the optimism monorepo but that would be convenient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant