NPM Cannot read property '0' of undefined

前端 未结 11 737
你的背包
你的背包 2021-01-03 17:52

After updated Node (upto v8.6.0) and npm (upto v5.5.1) I cannot execute command npm install. After npm install I\'ve error message:

npm ERR! Can         


        
11条回答
  •  無奈伤痛
    2021-01-03 18:38

    I've made some tests:

    nodejs@8.6.0 npm@5.5.1 - I have trouble and the test fails

    nvm use 8.5.0
    

    nodejs@8.5.0 npm@5.5.1 - I have trouble and the test fails

    nvm use 8.4.0
    

    nodejs@8.4.0 npm@5.5.1 - I have trouble and the test fails

    npm install npm@^5 -g
    

    nodejs@8.4.0 npm@5.4.2 - I have trouble and the test fails

    nvm use 8.6.0
    npm install npm@^4 -g
    

    nodejs@8.6.0 npm@4.6.1 - no trouble, this fixes it.

提交回复
热议问题