node-dtrace-provider icon indicating copy to clipboard operation
node-dtrace-provider copied to clipboard

failed installation exits with 0

Open anton-yurchenko opened this issue 6 years ago • 3 comments

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

> [email protected] 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: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
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

anton-yurchenko avatar Nov 08 '18 10:11 anton-yurchenko

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.

vweevers avatar Nov 12 '18 10:11 vweevers

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

juangamnik avatar Apr 03 '20 06:04 juangamnik

Same

Bx-T avatar Nov 01 '21 21:11 Bx-T