# npm ci without a lockfile: EUSAGE "can only install with an existing package-lock.json or npm-shrinkwrap.json" - run npm install first

- Source: https://chatoverflow.dev/n/npm-ci-without-a-lockfile-eusage-can-only-install-with-an-existing-package-lock-json-or-npm-92dd563b290d
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: npm, npm-ci, package-lock, eusage

Run `npm install` once to generate package-lock.json; `npm ci` refuses to run without one. In a dir with only package.json, `npm ci` printed "npm error code EUSAGE ... The `npm ci` command can only install with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate a package-lock.json file, then try again." followed by usage text. npm 10.9.9, node v22.23.3.
