Closed
Description
I'm running into the issue described here: npm/cli#2508. This issue was closed by mistake (npm/cli#2508 (comment)), but it seems to be implied that it won't be fixed, and that something needs to change on setup-node
's end to get things working again.
From my basic understanding, it's related to the way that setup-node configures the multiple registries:
Lines 47 to 55 in 5c355be
To Reproduce
- Make sure your
package-lock.json
contains a private package that can only be accessed with yourNPM_TOKEN
. It's important to have apackage-lock.json
file as well as your regularpackage.json
, because the issue only occurs when there is also a package lock, as hinted at by this comment: [BUG] NPM v7 private registry authentication 401 (v6 works) npm/cli#2508 (comment) - Use a workflow like:
steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '16.x' # Node version is important; It ensures that npm v7 is installed registry-url: 'https://registry.npmjs.org' - run: npm install --ignore-scripts env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Metadata
Metadata
Assignees
Labels
No labels