npm not working after clearing cache

前端 未结 11 1000
南笙
南笙 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)

提交回复
热议问题