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 ERR! code E401 npm ERR! 401 Unauthorized - Token has expired
Token has expired - npm authentication failure
npm ERR! code ENOAUDIT npm ERR! Audit endpoint not supported
How to fix "npm ERR! code ENOAUDIT - Audit endpoint not supported"
npm ERR! code EBADDEVENGINES npm ERR! devEngines.runtime incompatible with current node version
How to fix "npm ERR! code EBADDEVENGINES - devEngines.runtime incompatible with current node version"