connor4312 / nodejs-testing

VS Code integration for node:test native tests
MIT License
43 stars 6 forks source link

pretest setting not working #34

Closed justinfagnani closed 3 months ago

justinfagnani commented 3 months ago

I've added ["npm", "run", "pretest"] to my preset config and package.json and am getting this error:

 *  Running pretest script: ["npm", "run", "pretest"] 

spawn ["npm", "run", "pretest"] ENOENT

This is with the verbose setting set.

I wonder if this is happening because I use nvm?

connor4312 commented 3 months ago

This would mean that npm is not in your PATH, or not in the PATH variable that VS Code has. You want to ensure that VS Code inherits your variables correctly, for example by prefering to launch it from a terminal containing the environment you want.

dvirtz commented 2 months ago

I also see this issue on Windows and npm is in path.