Node-gyp: Error when rebuilding node-gyp on mac

Created on 27 Dec 2017  路  3Comments  路  Source: nodejs/node-gyp

  • Node Version:

    node-v: v8.8.1
    npm-v: 5.4.2

  • Platform: Mac OS 10.12.6

  • Compiler:
  • Module:

Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Verbose output (from npm or node-gyp):

node-gyp rebuild

CXX(target) Release/obj.target/weakref/src/weakref.o
clang: error: no such file or directory: '1/.node-gyp/8.8.1/include/node'
clang: error: no such file or directory: '1/.node-gyp/8.8.1/src'
clang: error: no such file or directory: '1/.node-gyp/8.8.1/deps/uv/include'
clang: error: no such file or directory: '1/.node-gyp/8.8.1/deps/v8/include'
make: * [Release/obj.target/weakref/src/weakref.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:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/macbook 1/Documents/ReactNativeApps/DemoApp/node_modules/weak
gyp ERR! node -v v8.8.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/weak):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

Most helpful comment

GYP doesn't like spaces in paths. Your username has a space in it.

All 3 comments

node-gyp rebuild

CXX(target) Release/obj.target/weakref/src/weakref.o
clang: error: no such file or directory: '1/.node-gyp/8.8.1/include/node'
clang: error: no such file or directory: '1/.node-gyp/8.8.1/src'
clang: error: no such file or directory: '1/.node-gyp/8.8.1/deps/uv/include'
clang: error: no such file or directory: '1/.node-gyp/8.8.1/deps/v8/include'
make: * [Release/obj.target/weakref/src/weakref.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:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/macbook 1/Documents/ReactNativeApps/DemoApp/node_modules/weak
gyp ERR! node -v v8.8.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/weak):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

GYP doesn't like spaces in paths. Your username has a space in it.

How to fix this issue if we have space in folder name?

Was this page helpful?
0 / 5 - 0 ratings