npm ci failed on latest npm

What I Wanted to Do

npm ci

What Happened Instead

https://travis-ci.org/uNmAnNeR/imaskjs/builds/499665017
it works with npm@6.5.0:
https://travis-ci.org/uNmAnNeR/imaskjs/builds/491193094
reproduced locally and got:

11801 info lifecycle undefined@undefined~install: undefined@undefined
11802 info lifecycle undefined@undefined~postinstall: undefined@undefined
11803 verbose stack TypeError: Cannot read property 'length' of undefined
11803 verbose stack     at _incorrectWorkingDirectory (C:\Users\Alexey Kryazhev\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:100:60)
11803 verbose stack     at C:\Users\Alexey Kryazhev\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:72:44
11803 verbose stack     at C:\Users\Alexey Kryazhev\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:203:12
11803 verbose stack     at C:\Users\Alexey Kryazhev\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:285:20
11803 verbose stack     at FSReqWrap.oncomplete (fs.js:155:5)
11804 verbose cwd C:\Projects\imaskjs
11805 verbose Windows_NT 10.0.17134
11806 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Alexey Kryazhev\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "ci"
11807 verbose node v10.15.1
11808 verbose npm  v6.8.0
11809 error Cannot read property 'length' of undefined
11810 verbose exit [ 1, true ]

Reproduction Steps

npm ci in root for https://github.com/uNmAnNeR/imaskjs repo

Details

2019-02-28T07_28_48_031Z-debug.log (802.4 КБ)

Platform Info

Tested on travis-ci and Windows environments.

$ npm --versions
{ npm: '6.8.0',
  ares: '1.15.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.15.1',
  openssl: '1.1.0j',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '6.8.275.32-node.12',
  zlib: '1.2.11' }
$ node -p process.platform
win32

Reproduced on Mac with npm 6.8.0.

git clone https://github.com/uNmAnNeR/imaskjs
cd imaskjs
npm ci

(I also tried npm install and it succeeds.)

1 Like

Duplicate of (thanks for the report and reproduction steps though):

1 Like