How to fix npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/package - You do not have permission to publish in npm
The 403 Forbidden error when publishing occurs when the package name is taken, your email isn't verified, or you lack organization permissions. Try using a scoped package name.
Quick fix
Fixes npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/package - You do not have permission to publish
# Search npm for the package name
npm search <package-name>
# Or check directly
npm view <package-name>- Check if package name is available
- Use a scoped package name
- Verify your email
- Verify you are logged in as correct user
# Search npm for the package namenpm search <package-name># Or check directlynpm view <package-name>npm ERR! code E403npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/package - You do not have permission to publish
What this error means
The E403 error indicates you're authenticated but not authorized to publish this specific package. The most common cause is that the package name is already taken by another user. Other causes include unverified email, wrong user account, or missing organization permissions. This is an authorization issue, not an authentication issue—npm recognizes who you are, but won't let you publish this package.
Typical symptoms
- npm publish fails with "403 Forbidden"
- Error says "You do not have permission to publish"
- Same version republish fails
- Scoped package fails while unscoped works (or vice versa)
- CI/CD pipeline fails at publish step
- Works locally but fails in CI
Common causes
- Package name already taken by another user
- Email not verified on npm account
- Logged in as wrong user
- Trying to republish same version number
- "private": true set in package.json
- No permission to publish to organization scope
- Wrong registry configured
How to fix "npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/package - You do not have permission to publish"
Search for existing packages:
# Search npm for the package name
npm search <package-name>
# Or check directly
npm view <package-name>If it exists, you'll need a different name or use a scoped package.
Scoped packages include your username/org:
{
"name": "@yourusername/package-name",
"version": "1.0.0"
}Publish with public access:
npm publish --access publicnpm requires verified email to publish:
1. Go to npmjs.com
2. Log in to your account
3. Check for email verification banner
4. Click verification link in your email
Then retry:
npm publishCheck your current login:
# Check who you're logged in as
npm whoami
# If wrong user, log out and log in
npm logout
npm loginYou cannot republish the same version:
# Increment version
npm version patch # 1.0.0 -> 1.0.1
# or
npm version minor # 1.0.0 -> 1.1.0
# Then publish
npm publishCheck package.json for private setting:
{
"name": "my-package",
"private": false // Remove or set to false
}The "private": true setting prevents publishing.
For org-scoped packages (@org/package):
1. Go to npmjs.com/org/[your-org]
2. Check you're a member with publish permissions
3. Ask org admin to add you if needed
Verify with:
npm team ls @org:developersAdvanced notes
For GitHub Packages publishing:
{
"name": "@username/package",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}Requires a Personal Access Token with write:packages scope.
For CI/CD, the token must have publish permissions. In GitHub Actions, use:
permissions:
packages: writeIf publishing to both npm and GitHub Packages, configure separate registries for each scope in .npmrc.
Frequently asked questions
- What does "npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs" mean?
- The E403 error indicates you're authenticated but not authorized to publish this specific package. The most common cause is that the package name is already taken by another user. Other causes include unverified email, wrong user account, or missing organization permissions.
- How do I fix "npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs"?
- The 403 Forbidden error when publishing occurs when the package name is taken, your email isn't verified, or you lack organization permissions. Try using a scoped package name.
- What causes "npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs"?
- Package name already taken by another user Email not verified on npm account Logged in as wrong user
- Is the "npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚npm Official Documentation
- 💬
- 💬Stack Overflow: npm err 403 403 forbidden npm publish(Stack Overflow)
- 🐙GitHub #1012: npm/cli(GitHub)