npm ci does not run prepare script for Git modules (version 6.11.*)

What I Wanted to Do

Run npm ci in an application that had a Git module dependency, for which the Git module dependency had a prepare script defined.

What Happened Instead

It appears that the prepare script was not run.

Reproduction Steps

Install a git module with a prepare script: npm install git+ssh....
Run npm ci .


It appears that this is a recent regression. Version 6.10.3 works as expected. Versions 6.11.0 and above do not.

Platform Info

$ npm --versions
{ npm: '6.11.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  llhttp: '1.1.1',
  modules: '67',
  napi: '4',
  nghttp2: '1.37.0',
  node: '11.15.0',
  openssl: '1.1.1b',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.27.0',
  v8: '',
  zlib: '1.2.11' }
$ node -p process.platform

Possibly related:

This was probably fixed in 6.12.0: Release: 6.12.0

Hi John, I have done a quick test using node 12.11.1 with npm 6.12.0 and the “npm prepare” it is not executed with npm ci command. It is executed in 6.10.3 and it stop working from 6.11.X. I can provide more information if required about the test I did. Just let me know. Thank you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.