An error is reported when running NRM. Cannot find module ‘NPM’

Time:2021-12-4

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
    An error is reported when running NRM. Cannot find module 'NPM'

Recommended Today

Hive built-in function summary

1. Related help operation functions View built-in functions: Show functions; Display function details: desc function ABS; Display function extension information: desc function extended concat; 2. Learn the ultimate mental method of built-in function Step 1: carefully read all the functions of the show functions command to establish an overall understanding and impression Step 2: use […]