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.
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.
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.
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.
npm ERR! code E401 npm ERR! 401 Unauthorized - Token has expired
Token has expired - npm authentication failure
npm ERR! code EAI_NODATA npm ERR! errno EAI_NODATA npm ERR! getaddrinfo EAI_NODATA registry.npmjs.org
How to fix "npm ERR! code EAI_NODATA - getaddrinfo EAI_NODATA"
npm ERR! code EMPTYPACKAGE npm ERR! Package contains no files
How to fix 'npm ERR! code EMPTYPACKAGE' - Package contains no files
npm ERR! code EWORKSPACEMISSING npm ERR! Workspace does not exist: packages/missing
How to fix "npm ERR! code EWORKSPACEMISSING - Workspace does not exist" error
npm ERR! code EADDRNOTAVAIL npm ERR! errno EADDRNOTAVAIL npm ERR! Address not available
How to fix "npm ERR! code EADDRNOTAVAIL - Address not available" error