npm update check failed

前端 未结 14 1091
太阳男子
太阳男子 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 05:59

    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.

提交回复
热议问题