1

我在将我的 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/project@1.0.0' 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

有什么帮助谢谢!

4

0 回答 0