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

Installing fails when there is a space in the path #58

Closed
nicolaasmatthijs opened this issue Nov 13, 2012 · 5 comments
Closed

Installing fails when there is a space in the path #58

nicolaasmatthijs opened this issue Nov 13, 2012 · 5 comments

Comments

@nicolaasmatthijs
Copy link

When doing npm install -d on a path that contains a space, the following error is thrown:

npm http GET https://registry.npmjs.org/dtrace-provider/0.2.4
npm http 304 https://registry.npmjs.org/dtrace-provider/0.2.4
npm info install [email protected] into /path/with space/to/node_modules/bunyan
npm info installOne [email protected]
npm info /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider unbuild
npm info preinstall [email protected]
npm info build /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider
npm info linkStuff [email protected]
npm info install [email protected]

> [email protected] install /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/Users/user/.node-gyp/0.8.8/tools/gyp/gyp',
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   '/path/with space/to/node_modules/bunyan/node_modules/dtrace-provider/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/.node-gyp/0.8.8/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/user/.node-gyp/0.8.8',
gyp info spawn args   '-Dmodule_root_dir=/path/with space/to/node_modules/bunyan/node_modules/dtrace-provider',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  ACTION binding_gyp_libusdt_target_build_libusdt .
/bin/sh: space/to/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/path/with: No such file or directory
Using node: /usr/local/bin/node
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
gcc -O2 -arch x86_64   -c -o usdt.o usdt.c
gcc -O2 -arch x86_64   -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -arch x86_64   -c -o usdt_probe.o usdt_probe.c
gcc -O2 -arch x86_64   -c -o usdt_dof.o usdt_dof.c
gcc -O2 -arch x86_64   -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o 
ranlib libusdt.a
  TOUCH Release/obj.target/libusdt.stamp.node
  CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_provider.o
  CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_probe.o
  SOLINK_MODULE(target) Release/DTraceProviderBindings.node
clang: error: no such file or directory: 'OAE/ui/newOAE/Hilary/node_modules/bunyan/node_modules/dtrace-provider/libusdt'
make: *** [Release/DTraceProviderBindings.node] 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:219:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 11.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v0.8.8
gyp ERR! node-gyp -v v0.6.7
gyp ERR! not ok 
npm info [email protected] Failed to exec install script
npm info /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider unbuild
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info postuninstall [email protected]
npm info /path/with space/to/node_modules/bunyan unbuild
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info postuninstall [email protected]
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 dtrace-provider 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 dtrace-provider
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-d"
npm ERR! cwd /path/with space/to
npm ERR! node -v v0.8.8
npm ERR! npm -v 1.1.59
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /path/with space/to/npm-debug.log
npm ERR! not ok code 0

The error goes away when removing the space from the path.

@trentm
Copy link
Owner

trentm commented Nov 15, 2012

Ugh. Unfortunate side-effect of adding dtrace-provider as a dep. Thanks for the bug report. I'll see if I can get a patch to dtrace-provider, else I'll just log a bug there. :)

@trentm
Copy link
Owner

trentm commented Nov 15, 2012

Same issue as kelektiv/node.bcrypt.js#121
This is an issue with gyp.

@trentm
Copy link
Owner

trentm commented Nov 15, 2012

Here is the real issue referred to in that bug: nodejs/node-gyp#65

And the related node-dtrace-provider bug: chrisa/node-dtrace-provider#25

Closing the bunyan issue -- thought bunyan could mitigate by making dtrace-provider an optional dep, I'd rather not.

@trentm
Copy link
Owner

trentm commented Nov 15, 2012

Added nodejs/node-gyp#164 that should fix this. That'll require a new core node release with the new node-gyp tho.

@nicolaasmatthijs
Copy link
Author

Thanks Trent! In the meantime, I'll just add a note to our README. Making the dtrace-provider an optional dependency is probably not necessary.

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

2 participants