npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm ci --only=dev does not install anything

What I Wanted to Do

I’d like to install only devDependecies with npm ci command.

What Happened Instead

npm ci --only=dev
added 0 packages in 0.035s 

Reproduction Steps

mkdir npm-ci-only-dev-issue
cd npm-ci-only-dev-issue
npm init -y
npm i -D got
rm -rf ./node_modules
npm ci --only=dev
# added 0 packages in 0.026s


Expected behavior: npm ci --only=dev command creates node_modules dir and install devDependencies.

Platform Info

$ npm --versions
$ node -p process.platform
$ node --version

Reproduced on Linux with node v8.11.2. To my untrained eye, it almost looks like libcipm isn’t even considering to install anything, since the root package isn’t a dev dependency

I’m putting together a PR right now.


Dupliate of