Unexpected misbehaviour of the pipeline with NPM package installation

Hello everyone,

I am desperately struggling with a problem and hope that you can help me!

I am using an NPM library in a pipeline step in the before_script part, which is located on the same server as the project whose pipeline is being executed. In the past this was not a problem. I set the GITLAB_TOKEN via the NPM command, created the .npmrc with the appropriate directives and everything worked.

In the meantime, however, the same code no longer works. Since the place that is called does not run very often, we do not know whether the problem is caused by GitLab updates that have been carried out in the meantime, for example.

To narrow down the problem, I have temporarily generated a token NPM_TOKEN for my user that has all rights without restrictions to rule out that this could be a problem. If I execute the following lines in a Node v20 Docker container, everything works without any problems:

$ export NPM_TOKEN="glpat-....";
$ echo "" > .npmrc;
$ echo "@my-software-library:registry=https://gitlab.myserver.de/api/v4/projects/87/packages/npm/" >> .npmrc
$ echo "@my-software-library:registry=https://gitlab.myserver.de/api/v4/packages/npm/" >> .npmrc
$ npm config set -- //gitlab.myserver.de/api/v4/:_authToken=$NPM_TOKEN
$ npm config set -- //gitlab.myserver.de/api/v4/packages/npm/:_authToken=$NPM_TOKEN
$ npm i semantic-release @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/exec @semantic-release/gitlab  @semantic-release/release-notes-generator conventional-changelog-eslint semver @my-software-library/semantic-release

added 356 packages in 14s

108 packages are looking for funding
  run `npm fund` for details

Now, the same in the pipeline (I have implement 2 downloads with wget as a test, which works):

.prepare-meta:
  extends: .common-prepare-meta
  image:
    name: node:18-buster
    pull_policy: if-not-present
  variables:
    ARTIFACT_COMPRESSION_LEVEL: "fast"
    CACHE_COMPRESSION_LEVEL: "fast"
    NODE_OPTIONS: "--no-warnings"
  before_script:
    # The token is only set here to localise the error
    - export NPM_TOKEN="glpat-........";
    # Direct download of the NPM package, works
    - wget --header="Private-Token:$NPM_TOKEN" "https://gitlab.myserver.de/api/v4/projects/87/packages/npm/@my-software-library/semantic-release/-/@my-software-library/semantic-release-2.1.4.tgz"
    # Direct access to NPM path, also works
    - wget --header="Private-Token:$NPM_TOKEN" "https://gitlab.myserver.de/api/v4/packages/npm/@my-software-library%2fsemantic-release"
    # Write npm configuration with working token
    - echo "" > .npmrc;
    - echo "@my-software-library:registry=https://gitlab.myserver.de/api/v4/projects/87/packages/npm/" >> .npmrc
    - echo "@my-software-library:registry=https://gitlab.myserver.de/api/v4/packages/npm/" >> .npmrc
    - npm config set -- //gitlab.myserver.de/api/v4/:_authToken=$NPM_TOKEN
    - npm config set -- //gitlab.myserver.de/api/v4/packages/npm/:_authToken=$NPM_TOKEN
    - npm i semantic-release @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/exec @semantic-release/gitlab @semantic-release/release-notes-generator conventional-changelog-eslint semver @my-software-library/semantic-release --loglevel verbose
  script:
    - |
      # Recognize version by semantic release
      if [ ${CI_COMMIT_BRANCH} == 'staging' ] || [ ${CI_COMMIT_BRANCH} == 'release' ] ; then
        cd ${SEMANTIC_DIR}
        BUILD_VERSION=$(npx semantic-release --dry-run | grep -i 'the next release version is' | grep -Po "((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)")
        echo "Version detected: ${BUILD_VERSION}"
      else
        BUILD_VERSION=""
        echo "Version detected: none"
      fi

And here I get this:

npm verbose cli /usr/local/bin/node /usr/local/bin/npm
npm info using npm@10.8.2
npm info using node@v20.17.0
npm verbose title npm i semantic-release @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/exec @semantic-release/gitlab @semantic-release/release-notes-generator conventional-changelog-eslint semver @my-software-library/semantic-release
npm verbose argv "i" "semantic-release" "@semantic-release/changelog" "@semantic-release/commit-analyzer" "@semantic-release/exec" "@semantic-release/gitlab" "@semantic-release/release-notes-generator" "conventional-changelog-eslint" "semver" "@my-software-library/semantic-release" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:/root/.npm/_logs/2024-10-04T10_10_20_088Z-
npm verbose logfile /root/.npm/_logs/2024-10-04T10_10_20_088Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/semantic-release 206ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2fchangelog 65ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2fcommit-analyzer 72ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2fexec 585ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2fgitlab 72ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2frelease-notes-generator 86ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/conventional-changelog-eslint 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver 53ms (cache miss)
npm http fetch GET 401 https://gitlab.myserver.de/api/v4/packages/npm/@my-software-library%2fsemantic-release 105ms (cache skip)
npm http fetch GET 200 https://registry.npmjs.org/aggregate-error 94ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2fcommit-analyzer 14ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/fs-extra 116ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2ferror 126ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2ferror 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2frelease-notes-generator 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/aggregate-error 4ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2fnpm 78ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@semantic-release%2fgithub 115ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/cosmiconfig 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/debug 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/env-ci 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/execa 49ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/figures 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/find-versions 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/get-stream 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/git-log-parser 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hook-std 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/import-from-esm 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lodash-es 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hosted-git-info 77ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/p-each-series 52ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/marked-terminal 62ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/marked 73ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/p-reduce 50ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/read-package-up 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver 14ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/resolve-from 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver-diff 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/signale 49ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/yargs 63ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/conventional-changelog-angular 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/conventional-changelog-writer 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/import-from-esm 4ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/execa 4ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/conventional-commits-filter 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/conventional-commits-parser 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/parse-json 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/dir-glob 49ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/escape-string-regexp 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/formdata-node 59ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/globby 60ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/got 67ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hpagent 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/get-stream 11ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/parse-url 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/url-join 63ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/into-stream 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/indent-string 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/clean-stack 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/jsonfile 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/universalify 175ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/compare-func 72ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@types%2fsemver 77ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/handlebars 83ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/meow 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/meow 60ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ms 59ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/import-meta-resolve 61ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/onetime 50ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-stream 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/cross-spawn 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/merge-stream 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/signal-exit 50ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/npm-run-path 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/strip-final-newline 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@babel%2fcode-frame 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/human-signals 67ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/json-parse-even-better-errors 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/error-ex 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lines-and-columns 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/clean-stack 9ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/indent-string 15ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/path-type 35ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/fast-glob 61ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sindresorhus%2fmerge-streams 74ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/path-type 6ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ignore 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/slash 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/type-fest 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/p-cancelable 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/responselike 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/http2-wrapper 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lowercase-keys 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/cacheable-lookup 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sindresorhus%2fis 82ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/cacheable-request 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/form-data-encoder 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/decompress-response 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@szmarczak%2fhttp-timer 72ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@types%2fparse-path 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/unicorn-magic 523ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/parse-path 661ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/from2 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/find-up-simple 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/type-fest 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/p-is-promise 70ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/read-pkg 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/array-ify 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/dot-prop 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-obj 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/wordwrap 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/neo-async 59ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/uglify-js 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/shebang-command 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/which 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/path-key 52ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/path-key 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mimic-fn 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/shebang-regex 52ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/isexe 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/http-cache-semantics 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/defer-to-connect 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@types%2fhttp-cache-semantics 57ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/keyv 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mimic-response 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/normalize-url 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mimic-response 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/resolve-alpn 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-stream 6ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/json-buffer 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sec-ant%2freadable-stream 87ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/inherits 49ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/readable-stream 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/isarray 57ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/core-util-is 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/process-nextick-args 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/string_decoder 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@babel%2fhighlight 68ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish 70ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/js-tokens 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/chalk 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@babel%2fhelper-validator-identifier 72ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/escape-string-regexp 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/supports-color 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ansi-styles 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-flag 49ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-convert 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-name 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/protocols 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/parse-json 6ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/normalize-package-data 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@types%2fnormalize-package-data 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hosted-git-info 15ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/validate-npm-package-license 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/index-to-position 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/spdx-expression-parse 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lru-cache 52ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/spdx-correct 57ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semantic-release 9ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/semantic-release 20ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/typescript 225ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fplugin-paginate-rest 74ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fcore 80ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/http-proxy-agent 50ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fplugin-retry 140ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fplugin-throttling 73ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/https-proxy-agent 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/issue-parser 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mime 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/url-join 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/p-filter 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/nerf-dart 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/rc 52ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/registry-auth-token 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/env-paths 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tempy 59ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/import-fresh 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/js-yaml 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sindresorhus%2fmerge-streams 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/figures 4ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/human-signals 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/java-properties 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/npm-run-path 4ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/is-plain-obj 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/signal-exit 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/strip-final-newline 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/pretty-ms 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/yoctocolors 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-unicode-supported 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver-regex 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/super-regex 73ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/argv-formatter 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/spawn-error-forwarder 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/split2 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/stream-combiner2 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/through2 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/traverse 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ansi-escapes 77ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/chalk 37ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/cli-table3 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/node-emoji 50ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/supports-hyperlinks 68ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/pkg-conf 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/y18n 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/cliui 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/string-width 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/yargs-parser 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/get-caller-file 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/require-directory 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/cli-highlight 543ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/npm 1125ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fauth-token 69ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2frequest 73ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fgraphql 107ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2frequest-error 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/before-after-hook 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/universal-user-agent 35ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2ftypes 81ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2frequest-error 13ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/bottleneck 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/bottleneck 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2ftypes 76ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/agent-base 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/agent-base 50ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lodash.capitalize 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lodash.escaperegexp 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lodash.isplainobject 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lodash.isstring 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lodash.uniqby 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/p-map 41ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2ftypes 11ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/universal-user-agent 19ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fendpoint 77ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit%2fopenapi-types 78ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/strip-json-comments 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ini 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/deep-extend 60ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/temp-dir 49ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/unique-string 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@pnpm%2fnpm-conf 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/resolve-from 7ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/argparse 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/parent-module 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/onetime 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/time-span 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/function-timeout 93ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/duplexer2 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/callsites 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mz 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/environment 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/highlight.js 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/parse5-htmlparser2-tree-adapter 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/yargs 16ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/parse5 62ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/string-width 22ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@sindresorhus%2fis 7ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@colors%2fcolors 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/char-regex 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/emojilib 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-flag 13ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/supports-color 11ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/skin-tone 65ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ansi-styles 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/object-assign 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/any-promise 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/parse5 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/thenify-all 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/yargs-parser 14ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/cliui 20ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/emoji-regex 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 57ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/thenify 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/unicode-emoji-modifier-base 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@pnpm%2fnetwork.ca-file 68ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@pnpm%2fconfig.env-replace 82ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/config-chain 544ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/proto-list 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/load-json-file 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/find-up 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/pify 48ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/locate-path 52ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/strip-bom 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/path-exists 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/p-locate 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/json-parse-better-errors 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/p-limit 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/p-try 68ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 47ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/convert-hrtime 35ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/crypto-random-string 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/spdx-license-ids 50ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/spdx-license-ids 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/spdx-exceptions 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/wrap-ansi 49ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-convert 4ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/path-key 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/unicorn-magic 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/parse-ms 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mimic-fn 6ms (cache hit)
npm verbose stack HttpErrorAuthUnknown: Unable to authenticate, need: Bearer realm="Protected by OAuth 2.0", error="invalid_token", error_description="Token is expired. You can either do re-authorization or token refresh."
npm verbose stack     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:80:17
npm verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm verbose stack     at async RegistryFetcher.packument (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:90:19)
npm verbose stack     at async RegistryFetcher.manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:128:23)
npm verbose stack     at async #fetchManifest (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1199:20)
npm verbose stack     at async #nodeFromEdge (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1037:19)
npm verbose stack     at async #buildDepStep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:901:11)
npm verbose stack     at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:181:7)
npm verbose stack     at async Promise.all (index 1)
npm verbose stack     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:131:5)
npm verbose statusCode 401
npm verbose pkgid @my-software-library/semantic-release@*
npm error code E401
npm error Unable to authenticate, your authentication token seems to be invalid.
npm error To correct this please try logging in again with:
npm error   npm login
npm verbose cwd /builds/expopartner-miscellaneous/debriefing-protocol/.semantic-release
npm verbose os Linux 5.10.0-32-amd64
npm verbose node v20.17.0
npm verbose npm  v10.8.2
npm verbose exit 1
npm verbose code 1
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-10-04T10_10_20_088Z-debug-0.log
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

It really makes no sense! Why does the same token work in a normal shell, but not in the pipeline? Why does npm tell me in the pipeline that the token has expired? If I provoke the error with the wrong token in the shell, I only get the message that the login data is invalid.

Why does the same token work within the pipeline for a download with wget, but not with npm? From my point of view, GitLab influences the behaviour here.

Has something changed in the behaviour of the pipeline within the last major or minor versions that leads to this problem?