简体   繁体   English

在E404中安装有作用域的软件包

[英]Installation of a scoped package resolve in an E404

So I came across this problem when I am trying to install the request-promise module via npm. 因此,当我尝试通过npm安装请求承诺模块时遇到了这个问题。

It depends on a scoped package named @request/promise-core, and when I try to launch npm install request-promise from my project directory it returns me an error 404. This apparently it is a known issue, see: https://github.com/request/request-promise/issues/137 , but none of the solutions works for me, probably due to a wrong implementation on my side. 它取决于一个名为@ request / promise-core的有作用域的软件包,当我尝试从我的项目目录启动npm install request-promise ,它会向我返回错误404。这显然是一个已知问题,请参见: https:// github.com/request/request-promise/issues/137 ,但是这些解决方案都不适合我,可能是由于我这一边的实现错误。

What I tried so far: 到目前为止我尝试过的是:

  • configured npm config set "@request:registry" https://registry.npmjs.org/ , but did not worked. 配置了npm config set "@request:registry" https://registry.npmjs.org/ ,但是没有用。 Still returning E404 仍在返回E404
  • tried to manually install the package via github with npm install https://github.com/request/request-promise but no joy since it returns error: ENOEN when trying to open the request-promise-unpack/package.json file. 尝试使用npm install https://github.com/request/request-promise通过github手动安装软件包,但由于返回错误:ENOEN,因此在尝试打开request-promise-unpack / package.json文件时不高兴。

Probably I am missing some basic steps when trying to install the module, but I cannot figure out a different way of installing that module. 尝试安装模块时,我可能缺少了一些基本步骤,但是我无法找出安装该模块的其他方法。

Any suggestions or alternatives is very appreciated. 任何建议或替代方案都非常感谢。

I fixed with 我固定了

npm install -g npm

in the terminal and then I could install it: 在终端中,然后我可以安装它:

npm install --save request-promise

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM