How to fix npm ERR! code E410 npm ERR! 410 Gone - This package has been unpublished in npm
The E410 'Gone' error occurs when trying to install a package that was previously published but has since been unpublished from the npm registry. You'll need to find an alternative package or use a cached version if available.
Quick fix
Fixes npm ERR! code E410 npm ERR! 410 Gone - This package has been unpublished
npm view <package-name>- Verify the package status in the npm registry
- Remove the unpublished package from your dependencies
- Find and install an alternative package
- Update package-lock.json if needed
npm view <package-name>npm ERR! code E410npm ERR! 410 Gone - This package has been unpublished
What this error means
The npm ERR! code E410 indicates that the npm registry has returned a 410 HTTP status code, which is the HTTP standard response for 'Gone' resources. Unlike a 404 (Not Found), which could mean a package never existed, a 410 specifically tells you that the package existed at one point but has been deliberately removed from the registry. When a package author unpublishes their package, npm removes it from the registry and all public access. This can happen for various reasons: the maintainer decided to discontinue the project, consolidate packages, or follow corporate policies. The 410 status code allows npm's registry to distinguish between packages that never existed versus packages that were previously available but have been removed.
Typical symptoms
- Installation fails with 'code E410' and 'This package has been unpublished' message
- npm install or npm update commands abort when encountering the unpublished package
- CI/CD pipelines fail during the dependency installation phase
- Specific package versions no longer resolve even if they were previously installed
- The error message includes the 410 status code from the npm registry
Common causes
- The package author unpublished the package from the npm registry intentionally
- The package was removed by npm maintainers due to security, legal, or policy violations
- The package dependency is specified in package.json or package-lock.json with an unpublished version
- A monorepo or scoped package was removed from the npm registry after initial publication
- Network or proxy configuration issues are misinterpreting other HTTP responses as 410s
How to fix "npm ERR! code E410 npm ERR! 410 Gone - This package has been unpublished"
First, check if the package is actually unpublished by querying the npm registry directly.
npm view <package-name>If the package is unpublished, this command will return an error like 'npm ERR! 404 Not Found'. This confirms the package is no longer available.
Edit your package.json and remove the unpublished package from the dependencies or devDependencies section. Then delete node_modules and package-lock.json to ensure a clean state.
rm -rf node_modules package-lock.json
npm installAlternatively, use npm to uninstall the package:
npm uninstall <package-name>Search the npm registry for packages that provide similar functionality. Check the original package's GitHub repository for migration instructions or recommended alternatives.
npm search <package-functionality>
npm install <alternative-package-name>If the original package has a GitHub repository, check the README for links to forks or successor projects.
If you're working in a project with a package-lock.json, remove the unpublished package entry from it to prevent npm from trying to restore it during installation.
rm package-lock.json
npm installThis forces npm to fetch fresh dependency information from the registry.
Advanced notes
If you're the original package author and need to republish after unpublishing: npm blocks republishing the same package name and version for 24 hours after unpublishing. You must use a new version number (e.g., bump from 1.0.0 to 1.0.1) to republish. If you want to discontinue a package without completely removing it, consider using npm deprecate instead of npm unpublish - this allows existing users to keep using it while new users see a deprecation warning.
Frequently asked questions
- What does "npm ERR! code E410 npm ERR! 410 Gone - This package has been unpublish" mean?
- The npm ERR! code E410 indicates that the npm registry has returned a 410 HTTP status code, which is the HTTP standard response for 'Gone' resources. Unlike a 404 (Not Found), which could mean a package never existed, a 410 specifically tells you that the package existed at one point but has been deliberately removed from the registry.
- How do I fix "npm ERR! code E410 npm ERR! 410 Gone - This package has been unpublish"?
- The E410 'Gone' error occurs when trying to install a package that was previously published but has since been unpublished from the npm registry. You'll need to find an alternative package or use a cached version if available.
- What causes "npm ERR! code E410 npm ERR! 410 Gone - This package has been unpublish"?
- The package author unpublished the package from the npm registry intentionally The package was removed by npm maintainers due to security, legal, or policy violations The package dependency is specified in package.json or package-lock.json with an unpublished version
- Is the "npm ERR! code E410 npm ERR! 410 Gone - This package has been unpublish" 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
- ๐npm Official Documentation
- ๐Docs: npm CLI documentation(Official Docs)
- ๐ฌSO: npm 410 Gone errors(Stack Overflow)
- ๐GitHub: npm issues(GitHub)