npm publish --access public failed with 403


(Logan) #1

What I Wanted to Do

What Happened Instead

when trying to publish the package with command npm publish --access=public, I got this error.

Reproduction Steps

Details

0 info it worked if it ends with ok
1 verbose cli [ '/Users/logan/.nvm/versions/node/v10.9.0/bin/node',
1 verbose cli   '/Users/logan/.nvm/versions/node/v10.9.0/bin/npm',
1 verbose cli   'publish',
1 verbose cli   '--access=public' ]
2 info using npm@6.9.0
3 info using node@v10.9.0
4 verbose npm-session c02d2fe9d2d96faf
5 verbose publish [ '.' ]
6 info lifecycle @jslib/cli-utils@1.0.0~prepublish: @jslib/cli-utils@1.0.0
7 info lifecycle @jslib/cli-utils@1.0.0~prepare: @jslib/cli-utils@1.0.0
8 info lifecycle @jslib/cli-utils@1.0.0~prepublishOnly: @jslib/cli-utils@1.0.0
9 info lifecycle @jslib/cli-utils@1.0.0~prepack: @jslib/cli-utils@1.0.0
10 info lifecycle @jslib/cli-utils@1.0.0~postpack: @jslib/cli-utils@1.0.0
11 notice
12 notice 📦  @jslib/cli-utils@1.0.0
13 notice === Tarball Contents ===
14 notice 938B  package.json
14 notice 189B  index.js
14 notice 1.1kB LICENSE
14 notice 41B   README.md
14 notice 397B  lib/checkNodeVersion.js
14 notice 1.6kB lib/env.js
14 notice 47B   lib/exit.js
14 notice 486B  lib/launch.js
14 notice 1.3kB lib/logger.js
14 notice 1.8kB lib/module.js
14 notice 1.1kB lib/object.js
14 notice 279B  lib/request.js
14 notice 752B  lib/spinner.js
14 notice 429B  lib/validate.js
15 notice === Tarball Details ===
16 notice name:          @jslib/cli-utils
16 notice version:       1.0.0
16 notice package size:  4.2 kB
16 notice unpacked size: 10.4 kB
16 notice shasum:        141e88a0fa5c6ed8ac15d19b3c6f8db3ae6ef370
16 notice integrity:     sha512-sfFcjdKNe8oFD[...]Y8lHUfGV/J6Iw==
16 notice total files:   14
17 notice
18 http fetch PUT 403 https://registry.npmjs.org/@jslib%2fcli-utils 752ms
19 verbose stack Error: 403 Forbidden - PUT https://registry.npmjs.org/@jslib%2fcli-utils - Forbidden
19 verbose stack     at res.buffer.catch.then.body (/Users/logan/.nvm/versions/node/v10.9.0/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:109:15)
19 verbose stack     at process._tickCallback (internal/process/next_tick.js:68:7)
20 verbose statusCode 403
21 verbose pkgid @jslib/cli-utils@1.0.0
22 verbose cwd /Users/logan/myProj/jslib-cli/packages/@jslib/cli-utils
23 verbose Darwin 18.0.0
24 verbose argv "/Users/logan/.nvm/versions/node/v10.9.0/bin/node" "/Users/logan/.nvm/versions/node/v10.9.0/bin/npm" "publish" "--access=public"
25 verbose node v10.9.0
26 verbose npm  v6.9.0
27 error code E403
28 error 403 Forbidden - PUT https://registry.npmjs.org/@jslib%2fcli-utils - Forbidden
29 verbose exit [ 1, true ]

Platform Info

$ npm --versions
6.9.0
$ node -p process.platform
darwin
$ npm config get registry
https://registry.npmjs.org/
$ node -v
v10.9.0