npm ci no lockfile 📦 npm

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.

Seen on: npm

Meaning

Lockfile not committed (gitignored), or the project uses yarn/pnpm lockfiles instead.

Common causes

  • package-lock.json in .gitignore
  • Project uses yarn.lock or pnpm-lock.yaml

⚡ Quick fix

  1. Generate and commit package-lock.json
  2. Use the project’s package manager in CI (yarn install --frozen-lockfile, pnpm install --frozen-lockfile)

Detailed fix by platform

npm

  1. npm install --package-lock-only && git add package-lock.json

How to diagnose

  1. Files — Which lockfile exists?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.