I'm trying to publish a package to npm. You can see the repository here:
I logged in to npm with npm login
, then I ran npm publish
and got the following error message:
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT - 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.
I have no idea what that's supposed to mean. What am I missing?
I'm trying to publish a package to npm. You can see the repository here: https://github./biowaffeln/mdx-state
I logged in to npm with npm login
, then I ran npm publish
and got the following error message:
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs/mdx-state - 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.
I have no idea what that's supposed to mean. What am I missing?
Share Improve this question edited Sep 30, 2021 at 11:07 Peter Mortensen 31.6k22 gold badges110 silver badges133 bronze badges asked Nov 5, 2020 at 21:57 Mark KvetnyMark Kvetny 6741 gold badge6 silver badges20 bronze badges 2-
Did you check for potential security issues by executing
npm audit
? – Anatoly Commented Nov 5, 2020 at 22:03 - Yes I did, it said 0 security vulnerabilities. – Mark Kvetny Commented Nov 5, 2020 at 22:21
3 Answers
Reset to default 14Okay, I found the problem. Apparently, I didn't verify my email address, so that's why I didn't have the permission to upload packages. Talk about an unhelpful error message!
Login to npm website, Under your profile image in nav section, go to access tokens and delete already existing access tokens if any.
Now try logging in from the terminal and see if it works!!
Just resend a new email to verify the email address and everything works.