Problem description
After installing NRM using NPM I NRM – g at the command prompt, run NRM to report an error and prompt
Cannot find module 'npm'
terms of settlement
Through troubleshooting, it is found that there is a problem with the NPM version in the NRM directory. Modify the package.json file and reinstall the NPM in the NRM directory. The specific operations are as follows
- Find the installation directory of NRM. For example, my installation directory is D: \ program files (x86) \ nodist \ bin \ node_ modules\nrm
- Modify the package.json file in the directory to rely on the
"npm": "latest"
Change to"npm": "^6.0.0"
- Run NPM I in the directory to reinstall NPM