How to check NPM package availability
A CLI to account for package moniker rules
After hours of refactoring my code, renaming imports, demo site and repo, I realized I wasn’t allowed to publish that name on NPM. I did look for it and it showed up as non existant. It turns out there’re some package moniker rules I was not aware of.
In short, you aren’t allowed to publish if your package name differs by punctuation with an existing package. That is, you can’t use
mydialogs if there’s another package named
You can then use the CLI
name-exists to check for real NPM name availability:
npx name-exists <package-name>
It uses an offline snapshot of all the package names in the registry and compare your package name against them all.
Join the newsletter
I write about remote work, software and personal growth. Subscribe to enjoy my articles every once in a while.