2

I am having issues with publishing my npm package to the project gitlab registry.

Here is the gitlab-ci.yaml script

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

Running the pipeline, I get the following error

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

Anything helps thanks!

A.J
  • 315
  • 4
  • 17

0 Answers0