npm: “Cannot find module internal/errors”

前端 未结 3 861
别跟我提以往
别跟我提以往 2021-02-19 11:50

On a MacBook with the latest version of NodeJS, I am trying to update npm:

npm install npm@latest

The error message is:

npm ERR         


        
相关标签:
3条回答
  • 2021-02-19 12:03

    Try to reinstall npm from the package in node v6.11.3LTS, and then

    try to update to the latest npm v5.4.2

    npm install npm@latest -g

    and then update to the latest node v8.3.0

    npm install node@latest -g

    0 讨论(0)
  • 2021-02-19 12:04

    I had the same problem, and I solve it:

    1. uninstall node and npm, do as this answer.

    2. then install node

      brew install node
      

      and npm will also be installed.

    0 讨论(0)
  • 2021-02-19 12:23

    I had the same issue, the above answer did not work.

    I had old versions in node_modules.

    I simply deleted everything in node_modules and then ran:

    npm install npm@latest -g

    0 讨论(0)
提交回复
热议问题