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

Install fails when there's a space in .node-gyp path #121

Closed
scottoreilly opened this issue Oct 15, 2012 · 3 comments
Closed

Install fails when there's a space in .node-gyp path #121

scottoreilly opened this issue Oct 15, 2012 · 3 comments

Comments

@scottoreilly
Copy link

I have OS X and install is blowing up because I have a space in my home folder path. It looks like there's code somewhere that's not escaping spaces.

To test this, I created a new user with a home folder of "/Users/test/". Everything ran fine.

I then moved that user's home folder to "/Volumes/Macintosh HD/Users/test/". The install did not work with this error message:

  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/src'
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/deps/uv/include'
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/deps/v8/include'
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/deps/openssl/openssl/include'

There is no such file or directory, of course, because the directory it's looking for is just everything after the space in the file path.

Here's the console output for an install with no spaces in the home path:

Scotts-MacBook-Pro:~ test$ cd /Users/test/Desktop/a 
Scotts-MacBook-Pro:a test$ ls
Scotts-MacBook-Pro:a test$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt
npm http 200 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bcrypt/-/bcrypt-0.7.2.tgz
npm http 200 https://registry.npmjs.org/bcrypt/-/bcrypt-0.7.2.tgz
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 200 https://registry.npmjs.org/bindings/1.0.0
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz

> [email protected] install /Users/test/Desktop/a/node_modules/bcrypt
> node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.8.12/node-v0.8.12.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.12/node-v0.8.12.tar.gz
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE(target) Release/bcrypt_lib.node
  SOLINK_MODULE(target) Release/bcrypt_lib.node: Finished
[email protected] node_modules/bcrypt
└── [email protected]
Scotts-MacBook-Pro:a test$

Here's the console output for an install with a space in the home path:

Scotts-MacBook-Pro:~ test$ cd /Volumes/Macintosh\ HD/Users/test/Desktop/b 
Scotts-MacBook-Pro:b test$ ls
Scotts-MacBook-Pro:b test$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> [email protected] install /Volumes/Macintosh HD/Users/test/Desktop/b/node_modules/bcrypt
> node-gyp rebuild

  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/src'
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/deps/uv/include'
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/deps/v8/include'
clang: error: no such file or directory: 'HD/Users/test/.node-gyp/0.8.12/deps/openssl/openssl/include'
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:236:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 12.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Volumes/Macintosh HD/Users/test/Desktop/b/node_modules/bcrypt
gyp ERR! node -v v0.8.12
gyp ERR! node-gyp -v v0.7.0
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
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-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /Volumes/Macintosh HD/Users/test/Desktop/b
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Volumes/Macintosh HD/Users/test/Desktop/b/npm-debug.log
npm ERR! not ok code 0
Scotts-MacBook-Pro:b test$ 
@ncb000gt
Copy link
Member

@TooTallNate is this an issue with node-gyp or is it specific to the module?

@TooTallNate
Copy link
Collaborator

It's a problem with gyp itself unfortunately. See nodejs/node-gyp#65.

@defunctzombie
Copy link
Collaborator

Not a bcrypt issue.

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

No branches or pull requests

4 participants