You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, a home directory of Brad Old causes the build to fail:
> contextify@0.1.2 install /Users/Brad Old/Desktop/DEMO_jason/node_modules/d3/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild
info it worked if it ends with ok
info downloading: http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz
spawn python [ '/Users/Brad Old/.node-gyp/0.6.17/tools/gyp_addon',
'binding.gyp',
'-I/Users/Brad Old/Desktop/DEMO_jason/node_modules/d3/node_modules/jsdom/node_modules/contextify/build/config.gypi',
'-f',
'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/contextify/src/contextify.o
clang: error: no such file or directory: 'Old/.node-gyp/0.6.17/src'
clang: error: no such file or directory: 'Old/.node-gyp/0.6.17/deps/uv/include'
clang: error: no such file or directory: 'Old/.node-gyp/0.6.17/deps/v8/include'
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
ERR! Error: `make` failed with exit code: 2
at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
at ChildProcess.emit (events.js:70:17)
at maybeExit (child_process.js:362:16)
at Process.onexit (child_process.js:398:5)
ERR! not ok
npm WARN optional dependency failed, continuing contextify@0.1.2
clang: error: no such file or directory: 'HD'
clang: error: no such file or directory: '2/Projects/bla/code/bla.js/node_modules/libxslt/node_modules/libxmljs/src'
clang: error: no such file or directory: 'HD'
clang: error: no such file or directory: '2/Projects/bla/code/bla.js/node_modules/libxslt/node_modules/libxmljs/vendor/libxml/include'
make: *** [Release/obj.target/libexslt/deps/libxslt/libexslt/common.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:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
👍 Not just a Windows issue: I'm trying to install an Atom plug-in that uses node-gyp as a dependency, and my ~/.atom is stored on my cloud, by symlinking it to my "Google Drive" folder. I can't exactly rename that folder to not have a space, as it's tied into Google Drive's software...
Seems like this is a case for delimiting strings using a null character rather that splitting at spaces, kind of like find . -print0 | xargs -0 ... does, no?
Thanks Christian but that won't work.
The problem is not that node-gyp is trying to write temp files in a HOME path containing spaces that need escaping (what the HOME workaround actually fixes), the problem is when gyp is trying to access a file at a path containing spaces, doesn't matter if it's located in your home directory or not, it's not using the HOME variable at all when resolving this path.
Looks like there's nothing we can do about it as the problem comes from gyp itself, not node-gyp 😐
Activity
TooTallNate commentedon May 16, 2012
Confirmed. It looks like it might be a gyp bug, but I'll have to experiment a little bit more.
TooTallNate commentedon Jul 10, 2012
As a workaround, set your
HOMEenv variable to something that doesn't contain spaces.cshenoy commentedon Oct 15, 2012
Any updates to this issue?
issue nodejs#65: fix some shell escaping for building in a dir with s…
trentm commentedon Nov 15, 2012
Added a pull that fixes at least the node-dtrace-provider (and hence the node-bunyan) issues mentioned here: #164
jmwohl commentedon Nov 12, 2013
This still seems to be an issue... any progress on it? Setting the HOME env var didn't seem to help, though I may not be doing that correctly.
Glavin001 commentedon Jan 6, 2014
I still think this is an issue, @jmwohl.
Looking at the latest commit: https://github.com/TooTallNate/node-gyp/blob/7e98c99ce7e04e1599677a8b7919f7c387ad6a09/lib/configure.js#L311
And looking at the purposed solution: trentm@bbd979b
Looks like Pull Request was never merged: #164
Proposed Solution (lines 311+), from @trentm:
Old
Fixed
Add:
Change to:
Maybe I am missing something? My only confirmation that it is still not working is from the issue I made on another repository: nodegit/nodegit#123
Hope this can be resolved and merged soon!
Update:
Looks like the solution didn't completely work. Sorry for the false alarm 👎 .
Update configure.js
sebnapi commentedon May 28, 2014
This is an Open Issue:
workaround not working for me too
kfancy commentedon Aug 1, 2014
Work-around (definitely OS X, probably unix*) until this is fixed:
npm install -g PACKAGENAME
(this worked for me, to install zmq)
carstenhag commentedon Jan 23, 2015
Bump I guess? This still is an issue afaik.
Mike-Dunton commentedon Feb 3, 2015
I am still having this issue here is a log output.
freder commentedon Mar 30, 2015
yep, still an issue:
Zae commentedon Jun 9, 2015
Any progress on this?
nemoDreamer commentedon Jun 29, 2015
👍 Not just a Windows issue: I'm trying to install an Atom plug-in that uses node-gyp as a dependency, and my ~/.atom is stored on my cloud, by symlinking it to my "Google Drive" folder. I can't exactly rename that folder to not have a space, as it's tied into Google Drive's software...
Seems like this is a case for delimiting strings using a null character rather that splitting at spaces, kind of like
find . -print0 | xargs -0 ...does, no?30 remaining items
cclauss commentedon Sep 9, 2021
Use backslash…
HOME="/Mobile\ Documents/"julienfdev commentedon Sep 9, 2021
Thanks Christian but that won't work.
The problem is not that node-gyp is trying to write temp files in a HOME path containing spaces that need escaping (what the HOME workaround actually fixes), the problem is when gyp is trying to access a file at a path containing spaces, doesn't matter if it's located in your home directory or not, it's not using the HOME variable at all when resolving this path.
Looks like there's nothing we can do about it as the problem comes from gyp itself, not node-gyp 😐
fix: failure when build directory contains spaces (nodejs#65)
jessejiang0214 commentedon May 25, 2022
Cannot believe this bug has existed for 10 years!!!
This still exists in v9.0.0 on MacOS
hungtcs commentedon Jun 16, 2022
When I move my projects to a mobile hard disk, I have a problem from 10 years ago
davej commentedon Jun 27, 2022
By the way, I created a PR for this last year but it hasn't seen any movement: #2556
hungtcs commentedon Jun 28, 2022
It looks so easy to fix.
relativeflux commentedon Oct 25, 2022
Can this be looked at, please?
cclauss commentedon Oct 26, 2022
Can we have a GitHub Action that fails which demonstrates this problem? Which pull request should be reviewed?
fix: failure when build directory contains spaces
fix: failure when build directory contains spaces
steam0r commentedon Nov 7, 2024
on osx:
works:
fails:
display errors with node-gyp and space in path - nodejs/node-gyp/issu…
Merge pull request nodejs#65 from KiNgMaR/encoding_tests
Add electron-builder packaging pipeline (Windows/mac/Linux) + release…