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

Details

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

Platform Info

$ npm --versions
6.4.1
$ node -p process.platform
darwin
$ node --version
v10.13.0


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.

Edit:

https://github.com/zkat/cipm/pull/60


Dupliate of https://npm.community/t/3068