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


(Jefrey Sobreira Santos) #1

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 npmjs.com/package/awesomemodule to npmjs.com/package/awesome-module or whatever), to avoid this annoying situation? Or we are supposed to check if a name is free somehow else?


(Artem Varaksa) #2

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