npm expected package-lock.json (especially for npm ci) but could not find it. Regenerate the lockfile, or use npm install --package-lock-only before npm ci.
npm ci requires an existing package-lock.json. If the lockfile was deleted, not checked in, or you are in the wrong directory, npm throws ENOENT. Merge conflicts can also remove/rename the file. In monorepos, the lockfile may live at the workspace root rather than the package folder.
pwd
ls package.json package-lock.json npm-shrinkwrap.jsonIn monorepos, ensure you are at the root that owns the lockfile.
npm install --package-lock-onlyIf lockfile was deleted/corrupted, recreate it before npm ci.
Once package-lock.json is present and committed, run npm ci for deterministic installs.
If the project uses npm-shrinkwrap.json instead, ensure it is present or remove references if you standardized on package-lock.json.
Always commit package-lock.json for reproducibility. Resolve merge conflicts carefully; if in doubt, regenerate via npm install --package-lock-only. Workspaces may share a single root lockfile—run installs from that root.
npm error code ENOENT npm error syscall spawn git npm error path git npm error errno -4058 npm error enoent An unknown git error occurred
How to fix "spawn git ENOENT" in npm
npm error code E401 npm error Incorrect or missing password.
How to fix 'E401 Unable to authenticate' errors with npm private registries
npm notice access token expired or revoked. Please try logging in again.
Token has expired - npm authentication failure