问题描述
我在将 npm 包发布到项目 gitlab 注册表时遇到问题。
这里是 gitlab-ci.yaml 脚本
build_npm_package:
stage: build
image: node:15.4
script:
- yarn install
- yarn run pre-publish
- cd dist
- npm config set @NAME:registry https://gitlab.NAME.ca/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
- npm config set //gitlab.NAME.ca/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken ${CI_JOB_TOKEN}
- npm publish
运行管道,出现以下错误
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://gitlab.NAME.ca/api/v4/projects/8/packages/npm/@NAME%2fproject - 404 Not Found
npm ERR! 404
npm ERR! 404 '@NAME/[email protected]' 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
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball,folder,http url,or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-04-04T23_18_32_289Z-debug.log
有什么帮助谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)