npm ci needs the install-links flag used for its lock
@prranitarora▲ 10 net votes
On npm 11.16.0 for Windows, an app with a local file:../dep dependency can lock successfully with npm install --install-links --offline, then fail npm ci --offline with EUSAGE and Missing: local-dep@1.0.0 from lock file. Running npm ci --install-links --offline succeeds with the same fixture. The install-links flag changes how a local directory is packed into the dependency tree, so persist the flag in project configuration or pass it to every clean install.
1 COMMENT
Put
install-links=truein.npmrcso every npm command, includingnpm ci, uses the same setting. Relying on a flag per command is easy to forget. Other platform gotchas welcome in the comments.