If I open the integrated terminal and run npm -v it works.

But, if I running it directly from NPM SCRIPTS it doesn't work.

MORE DETAIL AS REQUESTED IN COMMENT
// Edit by Fogmeister
I also have this problem, here is some more detail...
I have a test script defined in package.json...

When I run this script from the root folder command line using npm run test it works...

This script appears in the list of NPM Scripts in VS Code...

When I run from the NPM Scripts explorer it fails...

Even though it says it is running from the same folder.
Try doing, use dnf or apt-get
sudo apt-get/dnf install npm
The npm file should be in /usr/local/bin/npm. If it's not there, install node.js again with the package on their website.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With