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 any parent directory name contains a space (Big Sur under M1) #867

Closed
ostracod opened this issue Apr 3, 2021 · 3 comments

Comments

@ostracod
Copy link

ostracod commented Apr 3, 2021

Starting conditions:

  • macOS 11.2.3 running on M1
  • Node 14.15.4
  • NPM 6.14.10

To reproduce:

mkdir "blah blah"
cd "blah blah"
mkdir wow
cd wow
npm init -y
npm install bcrypt

Resulting error:

  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
  LIBTOOL-STATIC Release/nothing.a
warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
clang: error: no such file or directory: 'blah/wow/node_modules/node-addon-api'
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 (/opt/homebrew/Cellar/node@14/14.15.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

Counter-example (builds just fine):

mkdir blah_blah
cd blah_blah
mkdir wow
cd wow
npm init -y
npm install bcrypt

Seems like some path is not properly quoted during the build process.

@recrsn
Copy link
Collaborator

recrsn commented Apr 3, 2021

Yes I'm aware of it. It's some underlying package used by mkdirp that has this issue.

@sam3d
Copy link

sam3d commented Sep 28, 2021

Oh my goodness thank you so much for this. I spent several hours trying to identify a bug in node-gyp on node v16 only to find it's because there's a space in a parent directory! You're a star! 🎉

@recrsn
Copy link
Collaborator

recrsn commented Oct 6, 2022

Tracking it here: #961

@recrsn recrsn closed this as completed Oct 6, 2022
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

3 participants