imyller / meta-nodejs

OpenEmbedded layer for latest Node.js releases
MIT License
79 stars 87 forks source link

node-gyp not working #84

Closed ithamar1975 closed 7 years ago

ithamar1975 commented 7 years ago

Hi all,

I built successfully cross compiler environment for poky linux distribution in yocto using morty repository. i.e bitbake core-image-minimal -c populate_sdk. it was successful. i built nodejs (using bitbake nodejs) I found node, and it seems to be working. I found npm and after certain efforts it seems to be working I found node-gyp as well. Howefer trying to rebuild an addon (that was successfully built on a non-poky node-gyp version before), it issued the following messages: root@2bbb5b3dd1a2:/opt/spellotape/addons/tabernacle-addon# node-gyp rebuild gyp info it worked if it ends with ok gyp info using node-gyp@3.5.0 gyp info using node@7.10.0 | linux | arm gyp http GET https://nodejs.org/download/release/v7.10.0/node-v7.10.0-headers.tar.gz gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad gyp ERR! stack network settings. gyp ERR! stack at Request. (/home/builder/fsl-community-bsp/build/tmp/sysroots/imx7s-warp/usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:193:21) gyp ERR! stack at emitOne (events.js:96:13) gyp ERR! stack at Request.emit (events.js:191:7) gyp ERR! stack at Request.onRequestError (/home/builder/fsl-community-bsp/build/tmp/sysroots/imx7s-warp/usr/lib/node_modules/npm/node_modules/request/request.js:845:8) gyp ERR! stack at emitOne (events.js:96:13) gyp ERR! stack at ClientRequest.emit (events.js:191:7) gyp ERR! stack at TLSSocket.socketErrorListener (_http_client.js:358:9) gyp ERR! stack at emitOne (events.js:96:13) gyp ERR! stack at TLSSocket.emit (events.js:191:7) gyp ERR! stack at connectErrorNT (net.js:1028:8) gyp ERR! System Linux 4.9.49-moby gyp ERR! command "/usr/local/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /opt/spellotape/addons/tabernacle-addon gyp ERR! node -v v7.10.0 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok root I do have internet in this computer so I doubt that I have a connection problem. Is there any other problem that might happen? Thanks, Ithamar

ithamar1975 commented 7 years ago

I managed to make it work you type node-gyp --nodedir=/usr/include/nodejs (where common gypi is found denoting where node version is built) and it worked.