Repository navigation
Closed
Labels
Milestone
Description
Current Behavior:
npm install with npm v7.0.2 throws the following exception (verbose log):
β npm i graphql --verbose
npm verb cli [
npm verb cli '/Users/daniel/.nvs/node/15.0.0/x64/bin/node',
npm verb cli '/Users/daniel/.nvs/node/15.0.0/x64/bin/npm',
npm verb cli 'i',
npm verb cli 'graphql',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@7.0.2
npm info using node@v15.0.0
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:/Users/daniel/.nvs/node/15.0.0/x64/lib/node_modules/npm/npmrc Completed in 1ms
npm timing config:load:builtin Completed in 1ms
npm timing config:load:cli Completed in 1ms
npm timing config:load:env Completed in 1ms
npm timing config:load:file:/Users/daniel/redacted/test/npm-7/.npmrc Completed in 0ms
npm timing config:load:project Completed in 0ms
npm timing config:load:file:/Users/daniel/.npmrc Completed in 1ms
npm timing config:load:user Completed in 2ms
npm timing config:load:file:/Users/daniel/.nvs/node/15.0.0/x64/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:cafile Completed in 0ms
npm timing config:load:validate Completed in 2ms
npm timing config:load:setUserAgent Completed in 0ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 9ms
npm verb npm-session 8e4eb2e06a0ea959
npm timing npm:load Completed in 19ms
npm timing arborist:ctor Completed in 0ms
npm timing idealTree:init Completed in 17ms
npm timing idealTree:userRequests Completed in 2ms
npm http fetch GET 401 https://redacted.jfrog.io/artifactory/api/npm/npm-prod/graphql 235ms
npm timing idealTree:#root Completed in 242ms
npm timing idealTree:node_modules/graphql Completed in 0ms
npm timing idealTree:buildDeps Completed in 243ms
npm timing idealTree:fixDepFlags Completed in 1ms
npm timing idealTree Completed in 263ms
npm timing command:install Completed in 266ms
npm verb stack Error: Unable to authenticate, need: Basic realm="Artifactory Realm"
npm verb stack at /Users/daniel/.nvs/node/15.0.0/x64/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:113:17
npm verb stack at processTicksAndRejections (node:internal/process/task_queues:93:5)
npm verb stack at async Arborist.[buildDepStep] (/Users/daniel/.nvs/node/15.0.0/x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:760:11)
npm verb stack at async Arborist.buildIdealTree (/Users/daniel/.nvs/node/15.0.0/x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:202:7)
npm verb stack at async Promise.all (index 1)
npm verb stack at async Arborist.reify (/Users/daniel/.nvs/node/15.0.0/x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
npm verb stack at async install (/Users/daniel/.nvs/node/15.0.0/x64/lib/node_modules/npm/lib/install.js:40:5)
npm verb statusCode 401
npm verb pkgid graphql@*
npm verb cwd /Users/daniel/redacted/test/npm-7
npm verb Darwin 19.6.0
npm verb argv "/Users/daniel/.nvs/node/15.0.0/x64/bin/node" "/Users/daniel/.nvs/node/15.0.0/x64/bin/npm" "i" "graphql" "--verbose"
npm verb node v15.0.0
npm verb npm v7.0.2
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR! https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login
npm verb exit 1
npm timing npm Completed in 602ms
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/daniel/.npm/_logs/2020-10-21T17_23_26_626Z-debug.log
.npmrc:
_auth="redacted=="
always-auth=true
email=redacted@redacted.me
registry=https://redacted.jfrog.io/artifactory/api/npm/npm-prod/
@redacted:registry=https://redacted.jfrog.io/artifactory/api/npm/npm-prod/
Expected Behavior:
should just work. the above works with npm v6+
Steps To Reproduce:
see above
Environment:
macOS Catalina 10.15.6
node.js v15.0.0 (but also reproduces with node.js v14.14.0 and a global npm upgrade to v7)
npm v7.0.2
if it matters:
nvs v1.6.0
Reacted by Joona PÀÀkkânen, Damian Koper, Auke van Leeuwen, Matt Johnson, Nils Plaschke, M Lindqvist, Jim Casey, Alex Kessock, Andrej Gessel, Adrienne Duong and 7 more
Activity
aukevanleeuwen commentedon Oct 26, 2020
Have the same thing. Changed my configuration to use
usernameand_passwordrather than_authand that seems to work.fix: legacy auth tokens
stefankraus-wf commentedon Nov 11, 2020
The solution posted by @aukevanleeuwen does not seem to work with email address usernames, even when urlencoding the
@symbol. #2153 looks like it will fix the issue. Until then, I have users that run into this issue downgrade to npm 6.XThanks for getting the fix in review so quickly @ruyadorno !
fix: legacy auth tokens
fix: legacy auth tokens
tremblaysimon commentedon Apr 15, 2021
Like I said in the PR comments a couple of days ago, I think the PR #2153 has never been merged so I think that issue shouldn't be closed.
ljharb commentedon Apr 15, 2021
@tremblaysimon the commit referenced above indicates it's in v7.0.11+.