来自github的NPM私有软件包未保存到node_modules

时间:2020-05-26 15:08:23

标签: npm github-actions github-package-registry npm-package npm-private-modules

我目前在github中有一个私有组织,其中包含3个存储库。回购之一与github工作流程一起使用,因此它作为同一组织的私有软件包发布。 现在,我正尝试在同一组织中使用另一个仓库中的私有软件包,那时候我遇到了奇怪的问题

package.json的相关部分是

"dependencies": {
   "@{ORG}/{therepo}": "1.0.0"
}

我将其作为.nmprc的内容(项目本地文件,而不是全局文件)

@{ORG}:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken={PERSONALAUTHTOKEN}

奇怪的是,当我执行npm i时没有错误,但是依赖项没有下载到node_modules上,只是没有!

我已经尝试过这种修改

package.json

"dependencies": {
    "{therepo}": "1.0.0"
}

.npmrc

registry=https://npm.pkg.github.com/@{ORG}
//npm.pkg.github.com/:_authToken={PERSONALAUTHTOKEN}

这似乎很好用,该软件包被拉下来了,我可以在node_modules中看到它,但是它不是这样做的方法,所以我想知道我的设置有什么问题像这样

0 个答案:

没有答案