How to fix npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@scope/package - Scope not found in npm

npmINTERMEDIATEHIGHUpdated Dec 5, 2025· 130 views

npm's E404 'Scope not found' error occurs when you attempt to publish a scoped package (@scope/package-name) where the scope (organization or user namespace) either doesn't exist on the npm registry, isn't associated with your account, or isn't properly configured.

Quick fix

Fixes npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@scope/package - Scope not found

npm whoami
  1. Verify you have the correct npm account logged in
  2. Create the organization on npmjs.com
  3. Verify you're a member of the organization
  4. Verify the scope name in package.json
npm — error
npm whoami
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@scope/package - Scope not found

What this error means

A scope is a unique namespace that prevents package name conflicts—each npm user and organization gets their own scope (e.g., @username or @organization), but the scope must first be created on npmjs.com before you can publish packages under it. This is NOT a 'package not found' error in the traditional sense—it's a routing failure because the scope/organization doesn't exist or you don't have permission to publish to it. When you run npm publish, npm sends a PUT request to the registry. The 404 means the registry could not locate the destination scope where your package should be published.

Typical symptoms

  • npm publish fails with 'code E404' and message 'Scope not found'
  • npm install fails when trying to install a scoped package you just created
  • CI/CD pipeline fails when attempting to publish scoped packages
  • Error message shows 'PUT' request failure with 404 status
  • Commands work locally but fail in CI/CD environment

Common causes

  1. Organization scope does not exist on npmjs.com yet
  2. Publishing a scoped package without --access public flag when org doesn't have private packages plan
  3. User account is not added to the organization on npmjs.com
  4. Publishing with a scope that doesn't match your logged-in npm account
  5. Typo in the scope name in package.json
  6. Stale npm authentication token after enabling 2FA or changing passwords

How to fix "npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@scope/package - Scope not found"

1Verify you have the correct npm account logged in

Check which npm account you're authenticated as:

bash
npm whoami

If it's the wrong account, log out and log back in:

bash
npm logout
npm login
2Create the organization on npmjs.com

You must create the organization/scope on npmjs.com before publishing. Go to https://www.npmjs.com/org/create and create an organization with the exact scope name you want to use.

Organization names must be lowercase and can include hyphens. For example:
- "my-company" creates scope @my-company
- "acme" creates scope @acme

3Verify you're a member of the organization

If publishing to an existing organization, make sure you've been added. The organization owner must visit https://www.npmjs.com/org/your-org-name/members and invite you.

You must have at least "Developer" permission level to publish packages.

4Verify the scope name in package.json

Open your package.json and check the name field:

json
{
  "name": "@your-org/package-name",
  "version": "1.0.0"
}

The scope name (between @ and /) must exactly match the organization name you created on npmjs.com. Common mistakes:
- Using uppercase letters (npm scopes are lowercase)
- Typos in the organization name
- Missing the @ symbol

5Use --access public when publishing

Scoped packages are private by default. When publishing a public scoped package:

bash
npm publish --access public

If you try to publish without --access public and your organization doesn't have a private packages plan, npm will return a 404 error.

6Regenerate authentication tokens for CI/CD

If encountering this error in CI/CD, generate a new npm automation token:

1. Visit https://npmjs.com/settings/tokens
2. Click "Create New Token" and select "Automation" type
3. Update the token in your CI/CD secrets

If you've enabled 2FA, you must use an Automation token for CI/CD.

Advanced notes

Scopes vs. User Accounts: Every npm user automatically gets a user scope matching their username (@username), but only organizations create organization scopes. If you want to publish under @myorg, the organization "myorg" must exist.

Public vs. Private Packages: Organization scoped packages are private by default. Free organization accounts can only publish public packages. Use --access public to force it public.

Scope Permissions Model: Scopes can only be associated with one registry at a time. If you set a scope to point to a private registry, all packages in that scope will be fetched from that registry.

Token Lifecycle: npm authentication tokens can expire or be invalidated if you enable 2FA, reset your password, or revoke them.

Frequently asked questions

What does "npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs" mean?
com before you can publish packages under it. This is NOT a 'package not found' error in the traditional sense—it's a routing failure because the scope/organization doesn't exist or you don't have permission to publish to it. When you run npm publish, npm sends a PUT request to the registry.
How do I fix "npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs"?
npm's E404 'Scope not found' error occurs when you attempt to publish a scoped package (@scope/package-name) where the scope (organization or user namespace) either doesn't exist on the npm registry, isn't associated with your account, or isn't properly configured.
What causes "npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs"?
Organization scope does not exist on npmjs.com yet Publishing a scoped package without --access public flag when org doesn't have private packages plan User account is not added to the organization on npmjs.com
Is the "npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading