Npm Install is not working

不想你离开。 提交于 2021-02-16 13:39:05

问题


I have installed nodejs on ubuntu

node -v v0.10.25

npm -v  gives 1.3.10

when i run

 sudo npm install -g 
or sudo npm install 

it gives me following error

1523 error TypeError: Cannot read property 'latest' of undefined 1523 error at next (/usr/share/npm/lib/cache.js:687:35) 1523 error
at /usr/share/npm/lib/cache.js:675:5 1523 error at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7) 1523 error at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7 1523 error at Object.oncomplete (fs.js:107:15) 1524 error If you need help, you may report this log at:

Any idea ?

why it is giving me this error

Thanks


回答1:


Check all the packages you are trying to install. Some of them might be unpublished from npm. See this issue: https://github.com/npm/npm/issues/4982




回答2:


There can be two problems:

  1. You might be using old versions of npm. You can update your client with

    npm install npm -g

  2. There is a chance that the package you are trying to install had been unpublished from npm :)



来源:https://stackoverflow.com/questions/33117626/npm-install-is-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!