npm update check failed

前端 未结 14 1060
太阳男子
太阳男子 2020-11-30 05:47

Last night I tried to update my node and npm, it seemed to have been successful, however ever since then I have been getting this same error any time I try and run any npm c

相关标签:
14条回答
  • 2020-11-30 06:03

    If the user does not have sudo rights in a unix environment, remember the user name you want to issue the command with (-> USER). Then use

    su

    Enter your root password. Then

    chown -R USER:USER .config

    Other .config folders that were created using root are also changed. In my case changing ~/.config/nvws owner did the job (chown -R THE USER YOU USE NPM WITH:THE USER YOU USE NPM WITH .config/nvm)

    0 讨论(0)
  • 2020-11-30 06:05

    I have similar error after node updating so i just delete directory .config and this help.

    0 讨论(0)
  • 2020-11-30 06:05

    run script to check for update

    sudo npm install -g npm-check-updates
    

    and later update using sudo npm

    0 讨论(0)
  • 2020-11-30 06:07

    If your are on macOS, you must update the config file. You just have to enter this command in your terminal:

    sudo npm i -g npm
    
    0 讨论(0)
  • 2020-11-30 06:08

    I got a Windows 10 environment:

    For me, first I did make sure all node.exe instances killed:

    taskkill /t /f /im node.exe
    

    Then I've updated npm to the latest version using npm-check-updates

    Finally, I deleted .config folder from user home C:\Users\<USERNAME>

    That's solved my problem.

    0 讨论(0)
  • 2020-11-30 06:18

    worked for me after running below command

    nvm use --delete-prefix version
    
    0 讨论(0)
提交回复
热议问题