我的.npmrc
@bytap:registry=https://gitlab.com/api/v4/packages/npm/
'//gitlab.com/api/v4/packages/npm/:_authToken'="${GITLAB_AUTH_TOKEN}"
'//gitlab.com/api/v4/projects/37004905/packages/npm/:_authToken'="${GITLAB_AUTH_TOKEN}"我的package.json
"name": "@bytap/reuicom",
"publishConfig": {
"@bytap/registry": "https://gitlab.com/api/v4/projects/37004905/packages/npm/"
},gitlab创建了名为bytap的组,并在其中包含了项目,即reuicom。
运行GITLAB_AUTH_TOKEN=<Gitlab Deploy token> npm publish --verbose获取此错误
npm verb stack HttpErrorGeneral: 404 Not Found - PUT https://gitlab.com/api/v4/packages/npm/@bytap%2freuicom - 404 Not Foundnpm ERR! code E404
npm ERR! 404 Not Found - PUT https://gitlab.com/api/v4/packages/npm/@bytap%2freuicom - 404 Not Found
npm ERR! 404
npm ERR! 404 '@bytap/reuicom@0.1.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.发布于 2022-06-19 08:14:15
您需要在注册表中将"supericium“(npm adduser)注册为用户名,然后登录(npm登录)才能在该范围下发布。
https://docs.npmjs.com/getting-started/publishing-npm-packages或
https://docs.npmjs.com/getting-started/scoped-packages发布于 2022-10-20 06:47:15
在我的例子中,我在项目中有一个.npmrc文件,它正在覆盖我的用户配置文件.npmrc设置。您可以运行npm config list来检查有效的配置值,并找出哪里出错了。
https://stackoverflow.com/questions/72654563
复制相似问题