Hi,
Since today, I can’t publish my npm package from Gitlab CI to gitlab npm registry (It worked well few days/weeks ago).
The npm publish command throw the following error :
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`
-
Account on gitlab.com (I’m maintainer of the repo)
-
Gitlab Version : GitLab Enterprise Edition 13.8.0-pre 413d723b2cc
-
Gitlab runners version :
13.7.0-rc1 (98e2e32d)
-
My
.gitlab-ci.yml
config :
image: node:latest
stages:
- deploy
deploy:
stage: deploy
script:
- echo "//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}">.npmrc
- npm publish
I already checked the npm registry documentation / tutorials and nothing had change on it since I had written my gitlab ci configuration.
I also try to remove the current version of the package and relaunch the build on a commit which worked in the past, without success.
I would be very grateful if you could help me fix my problem or identify a potential new bug.