Installation fails on Mac OS X when any parent folder name contains spaces. #339

Closed
mbostock opened this Issue Oct 10, 2013 · 8 comments

4 participants

@mbostock

For example:

$ npm install canvas
npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

> canvas@1.1.1 install /Users/mbostock/Development/Folder With Spaces/subfolder/node_modules/canvas
> node-gyp rebuild

  CXX(target) Release/obj.target/canvas/src/Canvas.o
clang: error: no such file or directory: 'Folder'
clang: error: no such file or directory: 'With'
clang: error: no such file or directory: 'Spaces/subfolder/node_modules/canvas/node_modules/nan'
make: *** [Release/obj.target/canvas/src/Canvas.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/Cellar/node/0.10.18/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.5.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.18/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mbostock/Development/Folder With Spaces/subfolder/node_modules/canvas
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

Renaming the folder to remove the spaces solves the problem.

@rvagg

ah, yes, this is a binding.gyp thing that's been fixed in some other projects using nan, I'll do a PR to fix this.

@kangax kangax closed this in 5b18863 Oct 11, 2013
@giacecco

Hi All, I still have the issue, using node-canvas 1.1.1 through npm. Is that normal? Perhaps 1.1.1 is older than the fix?

G.

@rvagg

@giacecco could you give us a copy of what's on your console when you install, including the error please?

@rvagg

actually sorry @giacecco, you're right. @kangax could you publish a 1.1.2 with 5b18863 included? binding.gyp in the 1.1.1 in npm looks like it hasn't changed.

@kangax

@rvagg published 1.1.2

@kangax

@rvagg Hm, I see 1.1.2 is failing on travis for fabric, but only on node 0.6. Any idea what it is?

@rvagg

@kangax do you really still need 0.6 support? it's something we've completely ignored for NAN, we only test 0.8 onwards. 0.6 probably wouldn't be too hard to support for really basic stuff but I'm not sure and would rather let it die personally.

@kangax

@rvagg I personally don't need it; we use 0.10 on production. But Fabric historically supported 0.6+. I suppose we can start phasing it out. I don't know if any of our users still rely on it.

@kangax kangax referenced this issue in kangax/fabric.js Nov 1, 2013
Closed

TravisCI build failure with node 0.6 #942

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment