Using Npm in Vscode Cause "Error: Cannot Find Module 'Semver' "

Using Npm in Vscode Cause "Error: Cannot Find Module 'Semver' "

If I start the project on vscode terminal:

npm run start

i get this errror:

internal/modules/cjs/loader.js:1083 throw err; ^

Error: Cannot find module 'semver'
Require stack:
- /usr/share/nodejs/npm/lib/utils/unsupported.js
- /usr/share/nodejs/npm/lib/cli.js
- /usr/share/nodejs/npm/bin/npm-cli.js

I check npm --version, it gives me error.

I run this command: export PATH="/usr/bin:$PATH" it fixes but when i restart the vscode, i get the same error.

I am using Kali Linux

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.