Error: Npm install cannot find module 'semver' (Solved)

I am debian 10 buster user. Today I've faced an error when i was going to run npm command after upgrading node js from 10 to 14. That error was Npm install cannot find module 'semver'. How i solved this error today is the topic. No need to run npm install semver or delete any file.

I have tried many ways but i have failed many times to solve this issus. Finally i did it using nvm . See the below step to solve this issue.

Just uninstall node from your system and then reinstall it via nvm. Your problem will be solved 100%. I am a debian 10 buster user. You can run it any linux distros.

mahedi@debain:~$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash

 

after executing the command. close your terminal and reopen then run this command to install node js latest version.

mahedi@debain:~$ nvm install v14.15.5

now check by typing node -v

 

Hope it can help you. Now you will get 14.15.5 version node in your system.

 

Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js