Cannot publish to verdaccio after npm-cli-login
See original GitHub issueYour Environment
- verdaccio version: Don’t know. Latest from dockerhub
- node version: v16.13.2
- package manager: npm@8
- os: mac
- platform: docker
Describe the bug
When I try to npm publish --workspaces
with .npmrc
generated by npm-cli-login
, I get ENEEDAUTH error.
I’m trying this from my local machine, but in the end of the day I need it to be working within Digitaocean Job. So I cannot just manually type npm adduser
.
To Reproduce
In my monorepo root:
npx npm-cli-login -u: testbench-verdaccio -p: verdaccio -e: yury.79120345101@gmail.com -r: https://testbench-verdaccio-mhs83.ondigitalocean.app/ -s: @testbench --config-path .npmrc
cat .npmrc
@testbench:registry=https://testbench-verdaccio-mhs83.ondigitalocean.app/
//testbench-verdaccio-mhs83.ondigitalocean.app//:_authToken=yx9sYwdrM7gUt7dQ/XY7lG9i/cEAL5G+HLripUMtSMA=
npm publish --workspaces
npm notice
npm notice 📦 @testbench/evaluator-protocol@1.0.0
npm notice === Tarball Contents ===
npm notice 231B package.json
npm notice 188B tsconfig.json
npm notice 2.1kB types.d.ts
npm notice === Tarball Details ===
npm notice name: @testbench/evaluator-protocol
npm notice version: 1.0.0
npm notice filename: @testbench/evaluator-protocol-1.0.0.tgz
npm notice package size: 1.0 kB
npm notice unpacked size: 2.5 kB
npm notice shasum: fa12539f227ab9a31fdd6e6a82b2f5097f1a17e1
npm notice integrity: sha512-vLk7BdgP12i7w[...]3licfwscQ8wZA==
npm notice total files: 3
npm notice
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`
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ychebotaev/.npm/_logs/2022-02-13T11_16_22_657Z-debug.log
Expected behavior
I expected my private packages published to verdaccio
Screenshots, server logs, package manager log
/Users/ychebotaev/.npm/_logs/2022-02-13T11_16_22_657Z-debug.log
:
0 verbose cli [
0 verbose cli '/usr/local/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli 'publish',
0 verbose cli '--workspaces'
0 verbose cli ]
1 info using npm@8.1.2
2 info using node@v16.13.2
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/Users/ychebotaev/Projects/testbench/.npmrc Completed in 3ms
10 timing config:load:project Completed in 5ms
11 timing config:load:file:/Users/ychebotaev/.npmrc Completed in 2ms
12 timing config:load:user Completed in 2ms
13 timing config:load:file:/Users/ychebotaev/.npm-packages/etc/npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 3ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 20ms
19 timing npm:load:configload Completed in 21ms
20 timing npm:load:setTitle Completed in 29ms
21 timing npm:load:setupLog Completed in 1ms
22 timing config:load:flatten Completed in 6ms
23 timing npm:load:cleanupLog Completed in 3ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 64ms
27 verbose publish [ '/Users/ychebotaev/Projects/testbench/evaluator-protocol' ]
28 notice
29 notice 📦 @testbench/evaluator-protocol@1.0.0
30 notice === Tarball Contents ===
31 notice 231B package.json
31 notice 188B tsconfig.json
31 notice 2.1kB types.d.ts
32 notice === Tarball Details ===
33 notice name: @testbench/evaluator-protocol
33 notice version: 1.0.0
33 notice filename: @testbench/evaluator-protocol-1.0.0.tgz
33 notice package size: 1.0 kB
33 notice unpacked size: 2.5 kB
33 notice shasum: fa12539f227ab9a31fdd6e6a82b2f5097f1a17e1
33 notice integrity: sha512-vLk7BdgP12i7w[...]3licfwscQ8wZA==
33 notice total files: 3
34 notice
35 timing command:publish Completed in 159ms
36 verbose stack Error: This command requires you to be logged in.
36 verbose stack at Publish.publish (/usr/local/lib/node_modules/npm/lib/publish.js:125:29)
36 verbose stack at async Publish.publishWorkspaces (/usr/local/lib/node_modules/npm/lib/publish.js:174:23)
37 verbose cwd /Users/ychebotaev/Projects/testbench
38 verbose Darwin 17.7.0
39 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "publish" "--workspaces"
40 verbose node v16.13.2
41 verbose npm v8.1.2
42 error code ENEEDAUTH
43 error need auth This command requires you to be logged in.
44 error need auth You need to authorize this machine using `npm adduser`
45 verbose exit 1
Configuration File (cat ~/.config/verdaccio/config.yaml)
Don’t have this file. It’s on DIgitalocean App Platform. Everything is by-default, except for env VERDACCIO_USER_NAME=testbench-verdaccio
Environment information
No such command. It’s run on Digitaocean App Platform configured from dockerhub image verdaccio/verdaccio:latest
Debugging output
$ npm -ddd
prints:
npm verb cli [ '/usr/local/bin/node', '/usr/local/bin/npm', '-ddd' ]
npm info using npm@8.1.2
npm info using node@v16.13.2
npm timing npm:load:whichnode Completed in 0ms
npm timing config:load:defaults Completed in 2ms
npm timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
npm timing config:load:builtin Completed in 2ms
npm timing config:load:cli Completed in 4ms
npm timing config:load:env Completed in 1ms
npm timing config:load:file:/Users/ychebotaev/Projects/testbench/.npmrc Completed in 5ms
npm timing config:load:project Completed in 8ms
npm timing config:load:file:/Users/ychebotaev/.npmrc Completed in 5ms
npm timing config:load:user Completed in 5ms
npm timing config:load:file:/Users/ychebotaev/.npm-packages/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:credentials Completed in 3ms
npm timing config:load:setEnvs Completed in 2ms
npm timing config:load Completed in 29ms
npm timing npm:load:configload Completed in 30ms
npm timing npm:load:setTitle Completed in 29ms
npm timing npm:load:setupLog Completed in 1ms
npm timing config:load:flatten Completed in 6ms
npm timing npm:load:cleanupLog Completed in 4ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load:projectScope Completed in 2ms
npm timing npm:load Completed in 84ms
$ npm config get registry
prints:
https://registry.npmjs.org/
Contribute to Verdaccio
- [Maybe if I know the reason] I’m willing to fix this bug 🥇
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@juanpicado Ah, yes )
/
in the end of the--registry
. Without it everything goes fine. Thank You )Don’t forget reset your credentials 😉 and please don’t share tokens or emails in tickets, bad people is around all the time, for your security 👍🏼