npm install fails with 'error-ex@^1.3.1' is not in the npm registry

雨燕双飞 提交于 2021-02-04 14:12:30

问题


npm install fails with the following error:

⠼ Installing packages...npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/error-ex
npm ERR! 404 
npm ERR! 404  'error-ex@^1.3.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'parse-json'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

回答1:


Well I don't know how to add this additional info, since I can't comment due to not having 50 reputation and my edit to the question with this details was rejected by the community with the message

This edit was intended to address the author of the post and makes no sense as an edit. It should have been written as a comment or an answer.

Visting https://registry.npmjs.org/error-ex & https://registry.npmjs.com/error-ex gives a cloudflare 404 error page.

Visiting the npm registry mirror at https://skimdb.npmjs.com/error-ex gives a json response but since the tarball links are from https://registry.npmjs.org/ npm install after setting the registry to the mirror fails with a cloudflare 404 for the url https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz

Tried with a couple of internet connections since the problem seems to be something with cloudflare. One of the internet connections I tried gave me the proper json response when tried via browser and wget. But still npm install failed.

Finally got it working by manually downloading the above tarball with the internet connection that gave me the proper result and then adding it to the npm cache by

npm cache add <link_to_the_tarball>

Note: Though this fixed this specific issue. There were other packages with the same issue. So, finally I ended up installing npm_lazy(http://mixu.net/npm_lazy/) to use as my repository. Manually added the failing item like error-ex to the npm_lazy cache by editing the json file.



来源:https://stackoverflow.com/questions/60179822/npm-install-fails-with-error-ex1-3-1-is-not-in-the-npm-registry

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