'NPM Publish Registry - 403 Forbidden - "You don't have permission to publish "..."

I've been trying to publish my package to the NPM Registry.
I get an error that I am not allowed to push my package to the registry.

403 Forbidden - PUT https://registry.npmjs.org/qdb - You do not have permission to publish "qdb". Are you logged in as the correct user?

I wonder why.



Solution 1:[1]

For me, I received this 403 error message when I had just created my NPM account, but not verified the email address on my account. I found the verification request email from NPM, clicked the link, and magically was able to publish my first package.

Solution 2:[2]

Happens either because of a duplicate package name or because you never verified your email address.

Solution 3:[3]

Check if you are publishing the same version. I needed to update the version of the package and npm publish again. From the Forbidden error that I was getting it was not obvious.

Solution 4:[4]

check your email registration and confirm verification
finnaly repeat publish your package
and i hope will work ?

Solution 5:[5]

Also happens when an org name is already taken. Use the following URL:

https://www.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.

Solution 6:[6]

There Could be many reasons for that

  1. Email not verified, so first verify your email with npmjs.com
  2. Someone else is using that same package name, it needs to be unique. So choose a unique name. You can change the name under package.json file.
  3. If you are republishing same package with changes you made , you need to change version , eg - 1.0.0 to 1.0.1. You can change the varsion name under package.json file as well.

Solution 7:[7]

I just verified my email and error gone. Now I can publish my packages.

Solution 8:[8]

change name like that(also the version) sample

  "name": "npm-helloworld-testwwwyy-xx",
  "version": "1.0.3"

Solution 9:[9]

Don't forget that you need to be logged-in.

Run npm login to be able to publish packages.

Solution 10:[10]

For me it was duplicate package name. Changing package name in package.json did the trick. There could be other two reasons:

  1. Try npm whoami . If you do not have username displayed try npm login.

  2. If you are trying to re-publish make sure you run npm version major/minor/patch as per your need.

Solution 11:[11]

This case of issue happen even though email is verified if you are Ubuntu user.

Add sudo cmd before npm login,

sudo npm login

Also use sudo while publish a module

sudo npm publish

Solution 12:[12]

In my case I had different email in my npm config than what my npm login is set up with.

So basically your email displayed via npm config ls -l should match the email specified in your npmjs.com account.

Solution 13:[13]

if you publish with NPM_TOKEN be sure it has publish permission, not read-only

Solution 14:[14]

For me there was another project with the same name. I just change the name and npm publish then it works good.