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

failed installation exits with 0 #124

Open
anton-yurchenko opened this issue Nov 8, 2018 · 3 comments
Open

failed installation exits with 0 #124

anton-yurchenko opened this issue Nov 8, 2018 · 3 comments

Comments

@anton-yurchenko
Copy link

Hey,
The errors are suppressed, so in case there is a missing dependency for the installation, npm install dtrace-provider exits with code 0 and allows to continue.
If used in CI pipe, it might create broken artifacts if not tested properly.

Here is an installation log on docker image node:10-alpine:

/opt/app # npm install dtrace-provider

> dtrace-provider@0.8.7 install /opt/app/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Linux 4.9.93-linuxkit-aufs
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/app/node_modules/dtrace-provider
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ dtrace-provider@0.8.7
added 960 packages from 609 contributors and audited 25030 packages in 22.076s
found 9 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
/opt/app # echo $?
0

Following suppress-error.js and setting environmental variable: export NODE_DTRACE_PROVIDER_REQUIRE="hard" does not solves the issue

@vweevers
Copy link

Setting environmental variable: export NODE_DTRACE_PROVIDER_REQUIRE="hard" does not solves the issue

I suspect that's because bunyan has dtrace-provider listed an an optionalDependency, so the exit code of node-gyp rebuild || node suppress-error.js is always ignored by npm.

@juangamnik
Copy link

This is still an issue. I get this error, too.

@Bx-T
Copy link

Bx-T commented Nov 1, 2021

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants