nodesource / docker-node

Dockerfiles for building docker images with the NodeSource Node.js binaries baked in.
MIT License
192 stars 22 forks source link

error building node -v v0.12.7 on debian jessie #32

Closed amshali closed 8 years ago

amshali commented 8 years ago

gyp info it worked if it ends with ok gyp info using pangyp@2.3.2 gyp info using node@0.12.7 | linux | x64 gyp http GET http://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz gyp http 200 http://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz gyp http GET http://nodejs.org/dist/v0.12.7/SHASUMS256.txt gyp http 200 http://nodejs.org/dist/v0.12.7/SHASUMS256.txt gyp info spawn python gyp info spawn args [ '/usr/lib/node_modules/pangyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/lib/node_modules/pangyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/root/.node-gyp/0.12.7/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/0.12.7', gyp info spawn args '-Druntime=node', gyp info spawn args '-Dmodule_root_dir=/', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp: binding.gyp not found (cwd: /) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/pangyp/lib/configure.js:346:16) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Linux 3.16.0-0.bpo.4-amd64 gyp ERR! command "node" "/usr/bin/node-gyp" "configure" gyp ERR! cwd / gyp ERR! node -v v0.12.7 gyp ERR! pangyp -v v2.3.2 gyp ERR! not ok

retrohacker commented 8 years ago

Hi @amshali,

Is this when building one of the Dockerfiles located in this directory, or is this when trying to compile a native addon in your own Dockerfile?

Could you share the whole Dockerfile and output?

amshali commented 8 years ago

It is when I am trying to build this docker file https://github.com/nodesource/docker-node/blob/master/debian/jessie/node/0.12.7/Dockerfile

docker build -t my_node_image .

retrohacker commented 8 years ago

That command is supposed to fail (since node-gyp doesn't have anything to build). It is combied with || echo "" to make sure it doesn't prevent the image from building.

The purpose is to have node-gyp fetch the headers necessary to build native modules to speed up npm installs in Dockerfiles that inherit from this one.