npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Can't update package anymore

A few days ago I was able to publish my scoped package @chantelle/eslint-config@0.3.0 with no problem, but when I tried to publish a new version I got 404 and an error saying the package name was not URL-friendly.

I noticed that somewhere in the process the slash in the package name is getting encoded to %2f and npm is throwing a 404 for the PUT request.

Registry URL works with both / and %2f, so I’m not sure if this is the reason for the problem.

Can anybody shed some light on what the issue is and how do I resolve it? Thanks in advance.


0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/11.9.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'publish' ]
2 info using npm@6.7.0
3 info using node@v11.9.0
4 verbose npm-session 2c72fb734eb3f53d
5 verbose publish [ '.' ]
6 info lifecycle @chantelle/eslint-config@0.4.0~prepublish: @chantelle/eslint-config@0.4.0
7 info lifecycle @chantelle/eslint-config@0.4.0~prepare: @chantelle/eslint-config@0.4.0
8 info lifecycle @chantelle/eslint-config@0.4.0~prepublishOnly: @chantelle/eslint-config@0.4.0
9 info lifecycle @chantelle/eslint-config@0.4.0~prepack: @chantelle/eslint-config@0.4.0
10 info lifecycle @chantelle/eslint-config@0.4.0~postpack: @chantelle/eslint-config@0.4.0
11 notice
12 notice 📦  @chantelle/eslint-config@0.4.0
13 notice === Tarball Contents ===
14 notice 954B   package.json
14 notice 283B   .editorconfig
14 notice 3.2kB  .gitattributes
14 notice 10.4kB index.js
14 notice 627B
14 notice 48.9kB yarn.lock
15 notice === Tarball Details ===
16 notice name:          @chantelle/eslint-config
16 notice version:       0.4.0
16 notice package size:  24.7 kB
16 notice unpacked size: 64.3 kB
16 notice shasum:        6b3932d1caeee3eb8a708cf4cb8a26d517a11249
16 notice integrity:     sha512-E9SyZjFF5w8ew[...]jpxXczYBzghMg==
16 notice total files:   6
17 notice
18 http fetch PUT 401 485ms
19 http fetch PUT 404 929ms
20 verbose stack Error: 404 Not Found - PUT - Not found
20 verbose stack     at res.buffer.catch.then.body (/usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:104:15)
20 verbose stack     at processTicksAndRejections (internal/process/next_tick.js:81:5)
21 verbose statusCode 404
22 verbose pkgid @chantelle/eslint-config@0.4.0
23 verbose cwd /Users/gabe/Projects/eslint-config
24 verbose Darwin 18.2.0
25 verbose argv "/usr/local/Cellar/node/11.9.0/bin/node" "/usr/local/bin/npm" "publish"
26 verbose node v11.9.0
27 verbose npm  v6.7.0
28 error code E404
29 error 404 Not Found - PUT - Not found
30 error 404
31 error 404 '@chantelle/eslint-config@0.4.0' is not in the npm registry.
32 error 404 Your package name is not valid, because
33 error 404 1. name can only contain URL-friendly characters
34 error 404 Note that you can also install from a
35 error 404 tarball, folder, http url, or git url.
36 verbose exit [ 1, true ]

I should add that the Org changed owners (I’m now the owner) and all the namespaced packages are gone from the Org’s list of packages but are still published.

Could this be related?

The thing about URL-friendly is caused by something else, I made a PR for it (link) but I see I didn’t add the requested changes yet.

Hi Lars, thanks for the reply!

It’s not clear from that PR, nor the corresponding thread here, where it relates to the publish flow or the package name validation. It’s my understanding that when it reaches line 157, the error has already ocurred. Does that mean that the package name test is broken?

Can you please clarify how the changes you made (and the ones you’re still to make) relate to the flow? I’m afraid I don’t quite get it.


I just meant that the “package name invalid”-error that you’re getting probably isn’t related to the E404 error. The PR is to fix that the package name test gets pkg@version instead of pkg (and then the test breaks on the @ sign). But you’re still getting an E404 which isn’t good of course. That could very well be related to the org transfer.

Ok so it was indeed related to the org transfer. Somehow all the packages that used to belong to the Org were missing from the “Packages” tab inside the Org profile (they were still acessible).

I had to re-add all the packages that once belonged there, luckily they were all scoped to the name of the Org (which raises the question, could anyone publish a scoped package with a scope that matches an Org name?).

The package name error was completely misleading, that needs some work. In any case, my problem was solved and me and my team are able to publish the packages again.