mcnamee / react-native-starter-kit

:rocket: A React Native boilerplate app to get you up and running very, very quickly :rocket:
MIT License
3.35k stars 865 forks source link

grpc failing on npm / yarn install #220

Closed vasiabikeru closed 5 years ago

vasiabikeru commented 5 years ago

Help us reproduce - tell us about your environment

  1. Using Mac 10.14.4, node v12.1.0, latest master version

Steps to reproduce

  1. yarn / npm install

Expected result

Install all modules successfully

Actual result

CXX(target) Release/obj.target/grpc_node/ext/byte_buffer.o In file included from ../ext/byte_buffer.cc:21: In file included from ../../nan/nan.h:223: In file included from ../../nan/nan_new.h:189: ../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1 return v8::StringObject::New(value).As();


/Users/valentinfilip/.node-gyp/12.1.0/include/node/v8.h:5380:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../ext/byte_buffer.cc:21:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
3 errors generated.
make: *** [Release/obj.target/grpc_node/ext/byte_buffer.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit ([...]/react-native-starter-kit/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "[...]/react-native-starter-kit/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=[...]/react-native-starter-kit/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=[...]/react-native-starter-kit/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd [...]/react-native-starter-kit/node_modules/grpc
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/12.1.0/bin/node [...]/react-native-starter-kit/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=[...]/react-native-starter-kit/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=[...]/react-native-starter-kit/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> ([...]/react-native-starter-kit/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1000:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
node-pre-gyp ERR! System Darwin 18.5.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "[...]/react-native-starter-kit/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd [...]/react-native-starter-kit/node_modules/grpc
node-pre-gyp ERR! node -v v12.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok 
mcnamee commented 5 years ago

Hi @vasiabikeru Looks like an environment issue with node. Can you please try:

vasiabikeru commented 5 years ago

Thank you for your reply @mcnamee. I tried both steps and sadly nothing worked. The error I get seems to be related to fsevents.

`react-native-starter-kit username$ npm install npm WARN deprecated fsevents@1.2.4: Way too old npm WARN deprecated core-js@2.6.4: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2. npm WARN deprecated joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2. npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit https://github.com/lukeed/kleur/releases/tag/v3.0.0\ for migration path(s). npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else. npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()

fsevents@1.2.9 install /Users/valentinfilip/Dropbox/Work/workspace/WeRecycle/react-native-starter-kit/node_modules/chokidar/node_modules/fsevents node install

node-pre-gyp WARN Using request for node-pre-gyp https download [fsevents] Success: "/Users/valentinfilip/Dropbox/Work/workspace/WeRecycle/react-native-starter-kit/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" is installed via remote

fsevents@1.2.4 install /Users/valentinfilip/Dropbox/Work/workspace/WeRecycle/react-native-starter-kit/node_modules/react-scripts/node_modules/fsevents node install

node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@12.1.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) SOLINK_MODULE(target) Release/.node CXX(target) Release/obj.target/fse/fsevents.o ../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8' static void Initialize(v8::Handle exports);`

I installed fsevents individually and the current version is : `react-native-starter-kit username$ npm add fsevents npm notice created a lockfile as package-lock.json. You should commit this file.

mcnamee commented 5 years ago

Gotcha. Given you've tried installing a fresh version of React Native and React Native isn't work, I'd recommend opening an issue on React Native or fsevents.

paulvales commented 5 years ago

@vasiabikeru do you have a solution? I have the same problem Use Windows 10, Node v10.15.3