npm Community Forum (Archive)

The npm community forum has been discontinued.

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

npm ci generate different package.json structure

What I Wanted to Do

When I’m installing modules via npm ci generated package.json for each module has no difference when I’m installing modules via npm install.
For example, I install webpack locally — I get next structure:

   // ...
  "bin": {
    "webpack": "./bin/webpack.js"

What Happened Instead

npm ci produces bin as it described on github in webpack repo:

  "bin": "./bin/webpack.js"

Reproduction Steps

# Normal case
mkdir temp; cd temp
npm init -y
npm i webpack
cat ./node_modules/webpack/package.json
# see bin property

# CI case
rm -rf node_modules; npm ci
cat ./node_modules/webpack/package.json
# see bin property

### Platform Info

$ npm --versions

{ temp: '1.0.0',
  npm: '6.4.1',
  ares: '1.13.0',
  cldr: '33.0',
  http_parser: '2.8.0',
  icu: '61.1',
  modules: '59',
  napi: '3',
  nghttp2: '1.32.0',
  node: '9.11.2',
  openssl: '1.0.2o',
  tz: '2018c',
  unicode: '10.0',
  uv: '1.19.2',
  v8: '6.2.414.46-node.23',
  zlib: '1.2.11' }

$ node -p process.platform