npm update check failed

node.jsNpm

node.js Problem Overview


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 command.

I have tried uninstalling and re-installing npm, but cannot get past this error message below.

Node version: v8.3.0

Error message I am getting:

┌───────────────────────────────────────────────────────────────────┐
│                      npm update check failed                      │
│                Try running with sudo or get access                │
│               to the local update config store via                │
│ sudo chown -R $USER:$(id -gn $USER) /Users/veritystothard/.config │
└───────────────────────────────────────────────────────────────────┘
module.js:491
    throw err;
    ^

Error: Cannot find module 'proto-list'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/config-chain/index.js:1:79)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)

I'm not sure what other details to include here, if anyone has had this issue before I'd appreciate your help. Thanks!

node.js Solutions


Solution 1 - node.js

Following is the answer from github

> Fix for windows, I got this message : > > npm update check failed Try running with sudo or get access to the > local update config store via sudo chown -R $USER:$(id -gn $USER) > C:\Users.config > > so I went on to C:\Users.config and deleted the > "configstore" folder. once I done this, next time a ran npm start, the > folder was re-generated, and error stopped

Fix for OSX:

After two hours of try-and-fail I managed to solve the issue as follows:

  1. go to folder /usr/local/lib/node_modules/
  2. right-click on the folder node_modules > go to Get Info
  3. update the permissions > add yourself and administrator account and set "read and write" for both
  4. run in the terminal "npm install packageName"
  5. if you still get the error, go to the same folder /usr/local/lib/node_modules/ and within the folder node_modules, update in the same way the permissions for the new package folder
  6. try to run again in the terminal "npm install packageName"

That worked for me! Hope it could help somebody.

Solution 2 - node.js

I had the same issue on AWS server, i used this command to update the config permissions and the npm command worked smooth.

> sudo chown -R $USER:$(id -gn $USER) ~/.config

Solution 3 - node.js

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

Solution 4 - node.js

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

Solution 5 - node.js

Issue and how to fix it

Run below command from a command prompt

Step 1 : (If possible open cmd as administrator)

  • npm install -g npm-check-updates

Step 2 :

  • Open new command prompt and Create a new project

Solution 6 - node.js

If you don't want to chown your entire .config directory (which contains configuration files from other programs), try:

sudo chown -R $USER:$(id -gn $USER) "/home/skaestle/.config/configstore/"

Solution 7 - node.js

Try running the command prompt Run as administrator mode, if that not solved your issue delete the .config folder under c:\user\<name of the user>\ and then try running the command prompt Run as administrator mode.

Solution 8 - node.js

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.

Solution 9 - node.js

I had the same error (npm update check failed) on a Centos 7 but not when installing node, just when loggin into the server and it was because there was no more space left. Deleted some files, updated the system and everything worked fine again.

Just in case somebody else comes to the same problem.

Solution 10 - node.js

I have a fixed that worked for me on OSX Catalina:

-------------------------------------
/var/log/nodejs/nodejs.log
-------------------------------------
> node server.js

€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
│             npm update check failed              │
│       Try running with sudo or get access        │
│       to the local update config store via       │
│ sudo chown -R $USER:$(id -gn $USER) /tmp/.config │
└──────────────────────────â”

I ran the following code in the terminal and as suggested here: sudo chown -R $USER:$(id -gn $USER) /tmp/.config & redeployed to my instance which still showed a degraded state.

I did this several times and this did not result in success.

Since I had a duplicate instance that was in the ready, so I didn't think it was a permissions problem on my local machine.

The following fix worked for me (please note that my code is deployed to ebs through AWS CodePipeline":

> 1. Delete package-lock.json from your express/node project. > 2. Run npm i > 3. git add && git commit -m "your commit msg" && git push

In your aws console, go to code pipeline and verify your code deployed successfully.

Navigate to Elastic Beanstalk. If your code pushed successfully, you should see your instance updating.

After this the state of your EBS environment should be in the ready state.

Hope this helps someone out.

Solution 11 - node.js

worked for me after running below command

nvm use --delete-prefix version

Solution 12 - node.js

Running the cmd with admin rights once was enough for me. Just did npm version.

After that it worked again also without admin rights. I did not delete anything.

{
  npm: '6.13.6',
  node: '12.14.1',
  ...
}

Solution 13 - node.js

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)

Solution 14 - node.js

I'm a windows user. I solved mine by going to the /Users/<username> right clicking the .config folder then in properties un-ticked the read only and apply

Solution 15 - node.js

This issues come due to TWO reasons

  1. You have no permission to read-write
  2. Due to window settings folder is secured.

case 1st- just enable the read-write permission case 2nd- if u have permission for read-write and still you facing the same issues, it means you system securities reject the request to write the file, because the file location is given in C drive

solution - JUST disable the firewall / Ransomware protection in windows 10. try again you will get the success.

Solution 16 - node.js

run script to check for update

sudo npm install -g npm-check-updates

and later update using sudo npm

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVStothardView Question on Stackoverflow
Solution 1 - node.jsisntnView Answer on Stackoverflow
Solution 2 - node.jsNadZView Answer on Stackoverflow
Solution 3 - node.jsFa RidView Answer on Stackoverflow
Solution 4 - node.jsSergey PavlovView Answer on Stackoverflow
Solution 5 - node.jsAbdullahView Answer on Stackoverflow
Solution 6 - node.jsStefanView Answer on Stackoverflow
Solution 7 - node.jsThirumalai muruganView Answer on Stackoverflow
Solution 8 - node.jsAl-MothafarView Answer on Stackoverflow
Solution 9 - node.jsjustanotherITguyView Answer on Stackoverflow
Solution 10 - node.jsNoble PolygonView Answer on Stackoverflow
Solution 11 - node.jsShadab AhmedView Answer on Stackoverflow
Solution 12 - node.jsandymelView Answer on Stackoverflow
Solution 13 - node.jsStefan BollmannView Answer on Stackoverflow
Solution 14 - node.jsLouie AguilarView Answer on Stackoverflow
Solution 15 - node.jsuser9061866View Answer on Stackoverflow
Solution 16 - node.jsDanielsView Answer on Stackoverflow