Skip to content

failed installation exits with 0 #124

@anton-yurchenko

Description

@anton-yurchenko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions