npm not working after clearing cache

前端 未结 11 966
南笙
南笙 2020-12-12 12:53

Before clearing cache

npm cache clear

npm is working fine. After clearing cache, it is not working. The error log below suggest problem wi

相关标签:
11条回答
  • 2020-12-12 13:14

    Environment path may have been removed.

    Check it by typing,

    npm config get prefix

    This must be the location where the npm binaries are found.

    In windows, c:/users/username/AppData/Roaming/npm is the place where they are found.

    Add this location to the environment variable. It should work fine.

    (Control Panel -> Search for 'Environment Variables' and click on a button with that name -> edit Path -> add the above location)

    0 讨论(0)
  • 2020-12-12 13:15

    at npm@6.8.0 the command that is been supported is npm cache verify

    0 讨论(0)
  • 2020-12-12 13:16

    I had to install the latest version of NodeJS. That worked out for me.

    0 讨论(0)
  • 2020-12-12 13:18

    This worked for me:

    npm cache clean --force 
    
    0 讨论(0)
  • 2020-12-12 13:20

    try this one npm cache clean --force after that run npm cache verify

    0 讨论(0)
  • 2020-12-12 13:21

    "As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use

    npm cache verify
    

    instead."

    0 讨论(0)
提交回复
热议问题