I used to check if a package name is available by opening https://www.npmjs.com/package/<name>
.
That doesn’t work anymore as NPM checks for similar-name conflicts.
Is there a different way?
npm-name
npm-name
@ npm / npm-name
@ GitHub
Check whether a package or organization name is available on npm
Install:
$ npm install npm-name
Usage:
const npmName = require('npm-name');
(async () => {
// Check a package name
console.log(await npmName('chalk'));
//=> false
// Check an organization name
console.log(await npmName('@ava'));
//=> false
})();
npm-name-cli
npm-name-cli
@ npm / npm-name-cli
@ GitHub
Install:
$ npm install --global npm-name-cli
Usage:
$ npm-name --help
Usage
$ npm-name <name> …
Examples
$ npm-name chalk
✖ chalk is unavailable
$ npm-name abc123
⚠ abc123 is squatted
$ npm-name unicorn-cake
✔ unicorn-cake is available
$ npm-name @ava
✖ @ava is unavailable
$ npm-name @abc123
✔ @abc123 is available
$ npm-name @sindresorhus/is unicorn-cake
✖ @sindresorhus/is is unavailable
✔ unicorn-cake is available
Exits with code 0 when all names are available or 2 when any names are taken
If you are interested in checking if an organization name is free, use the following URL:
https://npmjs.com/org/ORG_NAME_HERE
If you're getting a "404 Not Found" error, it means the name is free. Otherwise it is not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With