NPM Publish error message

Hi,

I am trying to publish a package to the npm registry. In my terminal, I created a new npmjs.org account via npm adduser. I am logged in.

I renamed my package.json file for my package. But when I run npm publish, I am still getting a permissions error message. Can anyone help me?

Hey.

What’s the exact error message?

Joshua

Hi,
Try to change the json file with more than 1 character like lion-lib-a1.
I was getting error too because i just changed it with one character.

I exactly don’t know what is the problem you’re facing it’s just a guess.

2 Likes

In my case, the cause of below error messages is that **I didn’t veryify my e-mail before publish a package after signing up to npmjs.com:
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/lion-lib-gioia1 - Forbidden
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Chitladar\AppData\Roaming\npm-cache_logs\2021-01-23T08_31_30_796Z-debug.log

After I verified my email, I could publish packages just fine.

No luck with changing package.json and even after verifying email?

Getting error below:

npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/lion-lib-2021-a1 - Forbidden
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.

Fix my own issue with resending email verification message.

I am facing same issue