chrisa / node-dtrace-provider

Native DTrace probes for node.js apps
Other
319 stars 70 forks source link

Fail to build inside docker-alpine -- Can't find Python executable "python" #113

Closed cadesalaberry closed 6 years ago

cadesalaberry commented 6 years ago
$ docker run -ti node:6-alpine npm i dtrace-provider
Unable to find image 'node:6-alpine' locally
6-alpine: Pulling from library/node
81033e7c1d6a: Pull complete 
4227978c61db: Pull complete 
d96df174e5f4: Pull complete 
Digest: sha256:4860a6e86a726760c3796fbfe86b0b6907aaad34b00dc836f492a654e47ca43a
Status: Downloaded newer image for node:6-alpine

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

gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:449:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:353:11
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:69:16)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 4.14.14-300.fc27.x86_64
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 /node_modules/dtrace-provider
gyp ERR! node -v v6.12.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
/
`-- dtrace-provider@0.8.6 
  `-- nan@2.8.0 

The installation seems to have worked and I can still use the package using dtrace normally (https://github.com/AzureAD/passport-azure-ad).

Why is this warning so giantic AND ignored ?

Shouldn't it just warn ?

Cheers,

melloc commented 6 years ago

@cadesalaberry The error is large since it's coming from inside node-gyp and including its stack plus npm's. It's ignored since compilation failure usually isn't a problem for most people and environments, and falling back on the stub provider is fine.

Unfortunately, there isn't a way for this library to suppress that error message. If you install node-gyp's requirements (Python 2 and GNU Make should be sufficient on Linux), then the error message will disappear.