How to fix npm ERR! code ENOTOWNER npm ERR! User is not an owner of this package in npm
The ENOTOWNER error occurs when you try to publish, unpublish, or modify an npm package you don't have ownership rights to. Verify your npm account, check the package's owner list, or request ownership from the current maintainer.
Quick fix
Fixes ENOTOWNER
npm owner ls <package-name>- Check who owns the package
- Verify your logged-in account
- Request ownership from current owner
- Check scoped package permissions
npm owner ls <package-name>npm ERR! code ENOTOWNERnpm ERR! User is not an owner of this package
What this error means
This error occurs when you attempt an operation that requires package ownership—like publishing, unpublishing, or adding collaborators—but your npm account isn't listed as an owner of the package. npm packages have explicit ownership. Only users listed as owners can perform certain operations. Collaborators (non-owners) can publish new versions but cannot unpublish, add other owners, or change access settings. The error is a permission check at the npm registry level, not a local file permission issue. It means the registry rejected your request because your account lacks the necessary rights.
Typical symptoms
- npm publish fails with 'not an owner' error
- Cannot unpublish a package version
- npm owner add fails for a package
- Error occurs with npm deprecate command
- Operations worked before but now fail (ownership changed)
- Different npm account logged in than expected
- Scoped package operations fail despite being org member
Common causes
- Attempting to publish to a package name you don't own
- Logged in with different npm account than intended
- Your ownership was removed by another owner
- Trying to unpublish as collaborator (not owner)
- Scoped package requires organization-level permissions
- npm authentication token lacks required permissions
How to fix "npm ERR! code ENOTOWNER npm ERR! User is not an owner of this package"
List the current package owners:
npm owner ls <package-name>This shows all users with owner permissions. Your username must be in this list for owner-level operations.
Confirm you're logged in as the correct user:
npm whoamiIf it shows a different account than expected:
npm logout
npm loginThen enter the credentials for the account that owns the package.
If you need ownership, ask a current owner to add you:
# Current owner runs:
npm owner add <your-username> <package-name>Only existing owners can add new owners.
For scoped packages (@org/package), verify your organization role:
1. Go to npmjs.com and log in
2. Navigate to your organization settings
3. Check your role (owner, admin, member)
4. Ensure you have publish/manage permissions for the team
Organization admins may need to grant you specific package access.
If you're trying to publish a new package and the name is taken:
{
"name": "@your-username/package-name"
}Using a scoped name under your username or organization avoids conflicts with existing packages.
If you believe you should have ownership (e.g., the package was transferred incorrectly):
1. Go to npmjs.com/support
2. Submit a support request
3. Provide evidence of your claim (prior ownership, transfer agreement, etc.)
npm support can investigate and resolve ownership disputes.
Advanced notes
Owner vs Collaborator permissions:
| Action | Owner | Collaborator |
|--------|-------|--------------|
| Publish new versions | ✓ | ✓ |
| Unpublish versions | ✓ | ✗ |
| Add/remove owners | ✓ | ✗ |
| Deprecate package | ✓ | ✗ |
| Change access level | ✓ | ✗ |
For CI/CD publishing:
If your CI pipeline gets ENOTOWNER:
1. Verify the NPM_TOKEN has publish rights
2. Check the token was generated by an account with ownership
3. For organization packages, ensure the token has the correct scope
4. Automation tokens may have different permissions than regular tokens
Two-factor authentication:
If 2FA is enabled on your npm account, owner operations may require an OTP. In CI, use an automation token which bypasses 2FA for publishing.
Frequently asked questions
- What does "ENOTOWNER" mean?
- This error occurs when you attempt an operation that requires package ownership—like publishing, unpublishing, or adding collaborators—but your npm account isn't listed as an owner of the package. npm packages have explicit ownership. Only users listed as owners can perform certain operations.
- How do I fix "ENOTOWNER"?
- The ENOTOWNER error occurs when you try to publish, unpublish, or modify an npm package you don't have ownership rights to. Verify your npm account, check the package's owner list, or request ownership from the current maintainer.
- What causes "ENOTOWNER"?
- Attempting to publish to a package name you don't own Logged in with different npm account than intended Your ownership was removed by another owner
- Is the "ENOTOWNER" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.