Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] "npm ci" does not build a binary extension #2169

Closed
uhop opened this issue Nov 13, 2020 · 2 comments
Closed

[BUG] "npm ci" does not build a binary extension #2169

uhop opened this issue Nov 13, 2020 · 2 comments
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@uhop
Copy link

uhop commented Nov 13, 2020

Current Behavior:

NPM 7: npm ci installs dependencies and DOES NOT build a binary extension automatically (binding.gyp is in the root).

There is no attempt to build an extension.

Expected Behavior:

Like NPM 6: npm ci installs dependencies and builds a binary extension automatically (binding.gyp is in the root).

Steps To Reproduce:

My repository: https://github.com/uhop/node-re2

Repro:

  1. Clone the repo (above).
  2. Run npm ci in the root.
  3. It doesn't build the extension.
    • npm i works.
    • npm ci of NPM 6 works.

Environment:

  • Ubunty 20.10
  • Node v15.2.0
  • NPM 7.0.8

Details

NPM 6 — "npm ci" (click to expand)
$ npm ci
npm WARN prepare removing existing node_modules/ before installation

> re2@1.15.9 install /media/raid/Work/node-re2
> install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild

Development flag was detected.
Building locally ...

> re2@1.15.9 rebuild /media/raid/Work/node-re2
> node-gyp rebuild

make: Entering directory '/media/raid/Work/node-re2/build'
  CXX(target) Release/obj.target/re2/lib/addon.o
  CXX(target) Release/obj.target/re2/lib/new.o
  CXX(target) Release/obj.target/re2/lib/exec.o
  CXX(target) Release/obj.target/re2/lib/test.o
  CXX(target) Release/obj.target/re2/lib/match.o
  CXX(target) Release/obj.target/re2/lib/replace.o
  CXX(target) Release/obj.target/re2/lib/search.o
  CXX(target) Release/obj.target/re2/lib/split.o
  CXX(target) Release/obj.target/re2/lib/to_string.o
  CXX(target) Release/obj.target/re2/lib/accessors.o
  CXX(target) Release/obj.target/re2/lib/util.o
  CXX(target) Release/obj.target/re2/vendor/re2/bitstate.o
  CXX(target) Release/obj.target/re2/vendor/re2/compile.o
  CXX(target) Release/obj.target/re2/vendor/re2/dfa.o
  CXX(target) Release/obj.target/re2/vendor/re2/filtered_re2.o
  CXX(target) Release/obj.target/re2/vendor/re2/mimics_pcre.o
  CXX(target) Release/obj.target/re2/vendor/re2/nfa.o
  CXX(target) Release/obj.target/re2/vendor/re2/onepass.o
  CXX(target) Release/obj.target/re2/vendor/re2/parse.o
  CXX(target) Release/obj.target/re2/vendor/re2/perl_groups.o
  CXX(target) Release/obj.target/re2/vendor/re2/prefilter.o
  CXX(target) Release/obj.target/re2/vendor/re2/prefilter_tree.o
  CXX(target) Release/obj.target/re2/vendor/re2/prog.o
  CXX(target) Release/obj.target/re2/vendor/re2/re2.o
  CXX(target) Release/obj.target/re2/vendor/re2/regexp.o
  CXX(target) Release/obj.target/re2/vendor/re2/set.o
  CXX(target) Release/obj.target/re2/vendor/re2/simplify.o
  CXX(target) Release/obj.target/re2/vendor/re2/stringpiece.o
  CXX(target) Release/obj.target/re2/vendor/re2/tostring.o
  CXX(target) Release/obj.target/re2/vendor/re2/unicode_casefold.o
  CXX(target) Release/obj.target/re2/vendor/re2/unicode_groups.o
  CXX(target) Release/obj.target/re2/vendor/util/pcre.o
  CXX(target) Release/obj.target/re2/vendor/util/rune.o
  CXX(target) Release/obj.target/re2/vendor/util/strutil.o
  SOLINK_MODULE(target) Release/obj.target/re2.node
  COPY Release/re2.node
make: Leaving directory '/media/raid/Work/node-re2/build'
added 101 packages in 103.094s
NPM 7 — "npm ci" (click to expand)
$ npm ci

added 101 packages, and audited 101 packages in 50s

found 0 vulnerabilities
@uhop uhop added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Nov 13, 2020
uhop added a commit to uhop/node-re2 that referenced this issue Nov 13, 2020
@darcyclarke
Copy link
Contributor

@uhop Appreciate the report; I think we've resolved a number of issues since this was first reported, can you try installing the latest v7 & trying to reproduce? (ie. npm i -g npm@7)

@darcyclarke darcyclarke removed the Needs Triage needs review for next steps label Feb 2, 2021
@uhop
Copy link
Author

uhop commented Feb 3, 2021

It WFM:

$ node --version
v15.7.0
$ npm --version
7.4.3
$ npm ci

> re2@1.15.9 install
> install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild

Trying https://github.com/uhop/node-re2/releases/download/1.15.9/darwin-x64-88.br ...
Writing to build/Release/re2.node ...
Done.

added 101 packages, and audited 102 packages in 2s

found 0 vulnerabilities
$ npm test

> re2@1.15.9 test
> node tests/tests.js

info: SUCCESS: 81 test functions, 567 individual tests

I think this issue can be safely closed.

@uhop uhop closed this as completed Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants