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

Catch exceptions when determine npm root in truffle #486

Closed
kanej opened this issue May 11, 2023 · 0 comments · Fixed by #493
Closed

Catch exceptions when determine npm root in truffle #486

kanej opened this issue May 11, 2023 · 0 comments · Fixed by #493
Assignees
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working

Comments

@kanej
Copy link
Member

kanej commented May 11, 2023

We are leaking unhandled exceptions during project initialization in truffle from the npm global lookup:

this.globalNodeModulesPath = execSync("npm root --quiet -g").toString();

https://github.com/NomicFoundation/hardhat-vscode/blob/9cfb24bb204bdab9b6f58f7598467205cc401887/server/src/frameworks/Truffle/TruffleProject.ts#LL61C3-L61C3

We should add a try/catch and log (but not to sentry) the issue. We should also switch from a sync call to an async call.

@kanej kanej added the status:ready This issue is ready to be worked on label May 11, 2023
@kanej kanej added the type:bug Something isn't working label May 11, 2023
@kanej kanej moved this to Todo in hardhat-vscode May 17, 2023
@antico5 antico5 moved this from Todo to In Progress in hardhat-vscode May 18, 2023
@antico5 antico5 moved this from In Progress to In Review in hardhat-vscode May 18, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in hardhat-vscode May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants