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
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.
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":
- Delete
package-lock.json
from your express/node project.- Run
npm i
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.
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:
That worked for me! Hope it could help somebody.
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
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/"
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',
...
}