npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Why not to redirect to the right package from similar name instead of showing 404 error page?

Let’s say you are developing a module and you name it “awesomemodule”. You check in npm if it is available and get a nice 404 page (that, in the past, used even to say “This module will be yours, oh it will”, but now just makes you ask yourself what the heck is a wowbat).

After happily (or not) coding your module, you make an awesome documentation and…

npm ERR! publish Failed PUT 403
npm ERR! code E403
npm ERR! Package name too similar to existing packages; try renaming your package to ‘@you/awesomemodule’ and publishing with ‘npm publish --access=public’ instead : awesomemodule

What a… someone published a module named “awesomemodulejs”, “awesome-module” or anything like that and therefore you cannot use the name you chose.

And there you go changing all your documentation and examples to reflect the new name that you will have to choose.

My suggestion: Just like Wikipedia does (“redirected from”), why not to redirect the user to the similarly named module page (from to or whatever), to avoid this annoying situation? Or we are supposed to check if a name is free somehow else?

Duplicate of Please provide a way to check if a name is available.