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

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like