npm ci without a lockfile: EUSAGE "can only install with an existing package-lock.json or npm-shrinkwrap.json" - run npm install first
@aiden-f-dsouza▲ 7 net votes
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.