npm errors

npm install and dependency errors: ERESOLVE, EACCES, lockfile and registry problems.

CodeErrorWhat it means
EOVERRIDE npm ERR! code EOVERRIDE — Override for x conflicts with direct dependency An "overrides" entry sets a different version for a package you also depend on directly.
Corepack keyid Error: Cannot find matching keyid (Corepack signature verification) An older Corepack couldn’t verify the signature of a newly published pnpm/yarn release after npm rotated its…
E404 npm ERR! code E404 — 404 Not Found: package@version is not in this registry npm asked the registry for a package (or version) that doesn’t exist there — a typo, a private/scoped package…
ERESOLVE npm ERR! code ERESOLVE — unable to resolve dependency tree npm 7+ found conflicting peer dependency requirements and refuses to install a broken tree.
npm ci out of sync npm ERR! `npm ci` can only install packages when your package.json and package-lock.json are in sync package-lock.json doesn’t match package.json, so npm ci refuses to install.
gyp ERR! gyp ERR! build error / node-gyp rebuild failed A dependency with native C/C++ code couldn’t compile — missing build tools, Python, or an unsupported Node ve…
ELSPROBLEMS npm ERR! code ELSPROBLEMS — invalid / extraneous / missing packages in npm ls npm ls found the installed tree doesn’t match package.json and the lockfile.
ETARGET npm ERR! code ETARGET — No matching version found for package@^9.9.9 The version range in package.json doesn’t match any published version of the package.
ENOTFOUND npm ERR! code ENOTFOUND — request to https://registry.npmjs.org/x failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org npm couldn’t resolve the registry hostname.
ELIFECYCLE npm ERR! code ELIFECYCLE / Command failed with exit code 1 An npm script (build, start, test, postinstall) exited with an error. ELIFECYCLE is only the wrapper — the re…
EROFS npm ERR! code EROFS — EROFS: read-only file system npm tried to write to a read-only location (read-only container filesystem, mounted volume, or system path).
npm git dependency error npm ERR! code 128 — An unknown git error occurred (git dependency install) npm failed to fetch a dependency that points to a Git repository.
EJSONPARSE npm ERR! code EJSONPARSE — Failed to parse json / Unexpected token in JSON at position package.json (or package-lock.json) contains invalid JSON.
SELF_SIGNED_CERT_IN_CHAIN npm ERR! code SELF_SIGNED_CERT_IN_CHAIN — request to https://registry.npmjs.org/ failed, reason: self signed certificate in certificate chain A corporate proxy or antivirus is intercepting HTTPS, and npm doesn’t trust its certificate.
ENOENT npm ERR! enoent ENOENT: no such file or directory, open '/path/package.json' npm ran in a directory without a package.json.
old lockfile npm WARN old lockfile — The package-lock.json file was created with an old version of npm, so supplemental metadata must be fetched The lockfile is lockfileVersion 1 (npm 6) and npm 7+ is upgrading it.
EPUBLISHCONFLICT npm ERR! 403 — You cannot publish over the previously published versions: 1.2.3 That version number has already been published (or unpublished) and can’t be reused.
E402 npm ERR! code E402 — 402 Payment Required - PUT https://registry.npmjs.org/@scope%2fpkg - You must sign up for private packages You published a scoped package without --access public, so npm tried to publish it as private.
E403 npm ERR! code E403 — 403 Forbidden - PUT https://registry.npmjs.org/x - You do not have permission to publish The registry refused the operation — the package name is taken, you lack publish rights, or 2FA/policies bloc…
npx executable npm ERR! could not determine executable to run npx couldn’t find a binary to run for that package.
tarball corrupted npm WARN tar TAR_ENTRY_ERROR / npm ERR! tarball data for x seems to be corrupted A downloaded package tarball is damaged — cache corruption or a network/proxy problem.
script command not found sh: vite: command not found (npm script) A tool used in an npm script isn’t installed in node_modules/.bin.
EACCES npm ERR! code EACCES — permission denied npm can’t write to a directory — usually global installs into a root-owned folder.
ECONNRESET npm ERR! code ECONNRESET — network aborted / socket hang up The connection to the registry was reset mid-download.
npm ETIMEDOUT npm ERR! code ETIMEDOUT — network request to https://registry.npmjs.org/x failed, reason: connect ETIMEDOUT npm couldn’t reach the registry in time — network, proxy or firewall issue.
npm ci no lockfile npm ERR! The `npm ci` command can only install with an existing package-lock.json or npm-shrinkwrap.json npm ci needs a committed lockfile and didn’t find one.
EBADPLATFORM npm ERR! code EBADPLATFORM — notsup Unsupported platform for fsevents: wanted {"os":"darwin"} (current: {"os":"linux"}) A package restricted to certain OS/CPU was installed as a required (not optional) dependency on another platf…
EEXIST npm ERR! code EEXIST — EEXIST: file already exists, symlink '../lib/node_modules/x/bin/x' -> '/usr/local/bin/x' A global install can’t create its command link because a file with that name already exists.
EINTEGRITY npm ERR! code EINTEGRITY — sha512 integrity checksum failed A downloaded package’s hash doesn’t match the integrity value in package-lock.json — a corrupted cache, a cha…
ENEEDAUTH npm ERR! code ENEEDAUTH — need auth This command requires you to be logged in npm needs credentials (publishing, private packages) but none are configured for that registry.
UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm can’t verify the registry’s certificate chain — missing intermediate or intercepted connection.
Missing script npm ERR! Missing script: "start" The script name you ran isn’t defined in package.json "scripts".
npm WARN deprecated npm WARN deprecated package@1.2.3: This package is no longer supported. A dependency (often a transitive one) is deprecated by its author.
invalid ELF header Error: /app/node_modules/bcrypt/lib/binding/bcrypt_lib.node: invalid ELF header A native module compiled for macOS/Windows is being loaded on Linux.
rollup native module Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies Rollup’s (and Vite’s) platform-specific optional dependency wasn’t installed — an npm optional-dependency bug…
No Xcode or CLT gyp: No Xcode or CLT version detected! node-gyp on macOS can’t find the Xcode Command Line Tools to compile native modules.
ENOTEMPTY npm ERR! code ENOTEMPTY — ENOTEMPTY: directory not empty, rename npm couldn’t rename a folder in node_modules because it wasn’t empty — usually a corrupted or concurrently mo…
Invalid Version npm ERR! Invalid Version: (semver parse error) A package.json or lockfile contains a version string that isn’t valid semver.
yarn not found yarn: command not found Yarn isn’t installed (or not enabled through Corepack) on this machine.
sharp module Error: Could not load the "sharp" module using the linux-x64 runtime sharp’s native binary for this OS/CPU isn’t installed — usually node_modules installed on another platform (M…
E401 npm ERR! code E401 — Unable to authenticate, need: Basic realm / Incorrect or missing password The registry rejected your credentials — missing, expired or wrong auth token.
workspace: protocol npm ERR! code EUNSUPPORTEDPROTOCOL — Unsupported URL Type "workspace:": workspace:* npm met the workspace: protocol used by pnpm/yarn, which npm doesn’t support.
npm update check failed npm update check failed — Try running with sudo or get access to the local update config store npm’s update notifier couldn’t write its config — usually root-owned files in ~/.config from a past sudo npm.
config global deprecated npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. A deprecation warning printed by npm 8.11–8.12 for the --global flag.
esbuild wrong platform You installed esbuild for another platform than the one you're currently using. node_modules contains esbuild’s binary for a different OS/CPU.
ERR_PNPM_OUTDATED_LOCKFILE ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json pnpm’s lockfile doesn’t match package.json, and CI installs with a frozen lockfile.
ENOSPC Error: ENOSPC: System limit for number of file watchers reached Linux ran out of inotify watches — dev servers watching large projects hit the limit.
EOTP npm ERR! code EOTP — This operation requires a one-time password from your authenticator Your npm account has 2FA for writes and no one-time password was supplied.
YN0028 YN0028: The lockfile would have been modified by this install, which is explicitly forbidden. Yarn Berry’s immutable install in CI found the lockfile needs changes.
cb() never called npm ERR! cb() never called! An old npm crash during install — usually network/cache corruption.