Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with --nodedir option #401

Closed
gibfahn opened this issue May 1, 2017 · 0 comments
Closed

Issues with --nodedir option #401

gibfahn opened this issue May 1, 2017 · 0 comments
Assignees
Labels

Comments

@gibfahn
Copy link
Member

gibfahn commented May 1, 2017

  • Node Version: any (tested with v4.8.3-proposal and v6.10.3-proposal)
  • CitGM Version: 1.11.10
  • Platform: any (tested on macOS Sierra)

While fixing #400 (comment) in the citgm-abi-smoker job, I noticed that native modules like bcrypt were trying to download the headers from nodejs.org, despite showing that they were passed the --nodedir citgm option. citgm-smoker also does an export npm_config_nodedir=/path/to/node, and doesn't have this problem. I added the export to citgm-abi-smoker, and the next build doesn't have this problem either.

I assume it's just that the option isn't being passed through for some reason.

I can replicate manually by doing:

git checkout v6.10.3-proposal
make -j4 binary # Builds node and packs into local tarball
tar -xf node-*.tar.gz
cd $PWD/node-*/bin && export PATH="$PWD:$PATH" && cd -
npm i -g citgm
citgm -v silly --nodedir $PWD bcrypt # Fails
export npm_config_nodedir="$PWD"
citgm -v silly --nodedir $PWD bcrypt # Passes
citgm -v silly bcrypt # Also passes
Bcrypt output:
verbose: bcrypt npm:         | Using temp directory: "/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/npm_config_tmp"
verbose: bcrypt nodedir      | Using --nodedir="/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/base-node"
verbose: bcrypt npm-install: | > bcrypt@1.0.2 install /tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt
verbose:                     | > node-pre-gyp install --fallback-to-build
       > bcrypt@1.0.2 test /tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt
 > npm install --build-from-source && nodeunit test
 > bcrypt@1.0.2 install /tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt
 > node-pre-gyp install --fallback-to-build
 Failed to execute '/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/bin/node /home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/lib/binding' (1)
 gyp ERR! configure error 
 gyp ERR! stack Error: 404 response downloading https://nodejs.org/download/release/v4.8.3/node-v4.8.3-headers.tar.gz
 gyp ERR! stack     at Request.<anonymous> (/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:210:14)
 gyp ERR! stack     at emitOne (events.js:82:20)
 gyp ERR! stack     at Request.emit (events.js:169:7)
 gyp ERR! stack     at Request.onRequestResponse (/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/lib/node_modules/npm/node_modules/request/request.js:954:10)
 gyp ERR! stack     at emitOne (events.js:77:13)
 gyp ERR! stack     at ClientRequest.emit (events.js:169:7)
 gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:433:21)
 gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:97:23)
 gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:322:20)
 gyp ERR! stack     at emitOne (events.js:77:13)
 gyp ERR! System Linux 4.4.14-200.fc22.x86_64
 gyp ERR! command "/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/bin/node" "/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/lib/binding"
 gyp ERR! cwd /tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt
 gyp ERR! node -v v4.8.3
 gyp ERR! node-gyp -v v3.4.0
 gyp ERR! not ok 
 node-pre-gyp ERR! build error 
 node-pre-gyp ERR! stack Error: Failed to execute '/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/bin/node /home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/lib/binding' (1)
 node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
 node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
 node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
 node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:862:16)
 node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
 node-pre-gyp ERR! System Linux 4.4.14-200.fc22.x86_64
 node-pre-gyp ERR! command "/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/bin/node" "/tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
 node-pre-gyp ERR! cwd /tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt
 node-pre-gyp ERR! node -v v4.8.3
 node-pre-gyp ERR! node-pre-gyp -v v0.6.32
 node-pre-gyp ERR! not ok 
 npm ERR! Linux 4.4.14-200.fc22.x86_64
 npm ERR! argv "/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/bin/node" "/home/iojs/build/workspace/citgm-abi-smoker/nodes/fedora22/smoker/bin/npm" "install" "--build-from-source"
 npm ERR! node v4.8.3
 npm ERR! npm  v2.15.11
 npm ERR! code ELIFECYCLE
 npm ERR! bcrypt@1.0.2 install: `node-pre-gyp install --fallback-to-build`
 npm ERR! Exit status 1
 npm ERR! 
 npm ERR! Failed at the bcrypt@1.0.2 install script 'node-pre-gyp install --fallback-to-build'.
 npm ERR! This is most likely a problem with the bcrypt package,
 npm ERR! not with npm itself.
 npm ERR! Tell the author that this fails on your system:
 npm ERR!     node-pre-gyp install --fallback-to-build
 npm ERR! You can get information on how to open an issue for this project with:
 npm ERR!     npm bugs bcrypt
 npm ERR! Or if that isn't available, you can get their info via:
 npm ERR! 
 npm ERR!     npm owner ls bcrypt
 npm ERR! There is likely additional logging output above.
 npm ERR! Please include the following file with any support request:
 npm ERR!     /tmp/74a7061e-5370-4a93-8d6d-9e1456c9a93a/bcrypt/npm-debug.log
 npm ERR! Test failed.  See above for more details.
@gibfahn gibfahn added the bug label May 1, 2017
@gibfahn gibfahn self-assigned this May 1, 2017
gibfahn added a commit to gibfahn/citgm that referenced this issue May 1, 2017
We currently pass --nodedir as an argument to `npm install`. However this
doesn't work for modules like bcrypt whose `npm test` script starts with
an `npm install`.

Fixes: nodejs#401
gibfahn added a commit to gibfahn/citgm that referenced this issue May 1, 2017
We currently pass --nodedir as an argument to `npm install`. However
this doesn't work for modules like bcrypt whose `npm test` script starts
with an `npm install`. Set the environment variable instead.

Fixes: nodejs#401
gibfahn added a commit to gibfahn/citgm that referenced this issue Sep 10, 2017
We currently pass --nodedir as an argument to `npm install`. However
this doesn't work for modules like bcrypt whose `npm test` script starts
with an `npm install`. Set the environment variable instead.

Fixes: nodejs#401
gibfahn added a commit to gibfahn/citgm that referenced this issue Feb 19, 2018
We currently pass --nodedir as an argument to `npm install`. However
this doesn't work for modules like bcrypt whose `npm test` script starts
with an `npm install`. Set the environment variable instead.

Fixes: nodejs#401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant