npm update check failed

Solution 1:

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:

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:

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:

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