mjmeintjes / boot-react-native

Better development experience with ClojureScript and React Native
117 stars 14 forks source link

npm install throwing issues for example app #42

Closed vikeri closed 8 years ago

vikeri commented 8 years ago

Hi!

When I run npm install in examples/app I get the following error:

Mac node v5.7.0 npm v3.7.5

npm WARN prefer global babel@5.8.35 should be installed with -g

> fsevents@1.0.8 install /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node" is installed via remote

> bufferutil@1.2.1 install /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/bufferutil
> node-gyp rebuild

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/bufferutil.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/bufferutil
gyp ERR! node -v v5.7.0
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok 
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1

> utf-8-validate@1.2.1 install /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/utf-8-validate
> node-gyp rebuild

  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/validation.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/utf-8-validate
gyp ERR! node -v v5.7.0
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok 
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.2.1 Exit status 1

> spawn-sync@1.0.15 postinstall /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/spawn-sync
> node postinstall
vikeri commented 8 years ago

Ok the issue was solely related to node-gyp, the following solved it for me: rm -R node_modules, rm -R ~/.node-gyp, rm -R ~/.npmrc and then a restart and ultimately npm install again. Solution from: https://github.com/nodejs/node-gyp/issues/809