繁体   English   中英

在“npm”注册表中找不到包“XXX”

[英]Couldn't find package "XXX" on the "npm" registry

我在安装yarn时遇到问题。

该软件包将使用npm install install 正确npm install但使用 yarn npm install时会产生上述错误。 error Couldn't find package "google-map-react" on the "npm" registry.

.npmrc

@companyname:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=476f....

我承认,删除 .npmrc 文件时,错误仍然存​​在。 这让我觉得这一定是一些问题。

我还断言以下命令只是在我的主目录中创建.npmrc文件? npm login --registry=https://npm.pkg.github.com --scope=@companyname

理想情况下,我希望能够安装外部 NPM 包。

所以我找了好久才找到。 我看到这个错误,因为 yarn 正在使用它的配置连接到 npm: npm.github.registry

我之前曾在 EuroStar 工作过,那里有自己的私有 npm 注册表。 因此它在简单的包上失败了,因为 npm 被完全锁定。

这么简单的命令:

yarn config delete registry

暂无
暂无

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

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