npmpublishnamingprefixnpm-publish

How to choose npm package name prefix for publishing


I have a question about npm package naming if I want to publish my own package. I created some faker-js examples for quick mockup with json downloads. The package is based on another package from npm named @faker-js/faker. Can I publish the package with the already existing @faker-js prefix? e.g @faker-js/examples (because it relates to it)? Or would that violate against their copyrights?


Solution

  • In order to publish a scoped package to npmjs.com, you would first need to create an organization named faker-js. Since the name is already taken, you wouldn't be able to publish your package with the @faker-js prefix.