bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.86k stars 2.09k forks source link

Node 10 compatibility #2117

Open aaronovz1 opened 5 years ago

aaronovz1 commented 5 years ago

Installing bitcore with node 10 has errors because some of the other libraries like bitcore-node are using old incompatible dependency versions of bufferutil and utf-8-validate. Can the package-lock.json be updated?

The errors seen are:

make: Entering directory '/tmp/node_modules/utf-8-validate/build'
  CXX(target) Release/obj.target/validation/src/validation.o
In file included from ../node_modules/nan/nan.h:190,
                 from ../src/validation.cc:15:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
make: Entering directory '/tmp/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
In file included from ../binding.cc:29:
/usr/include/zmq_utils.h:46:84: note: #pragma message: Warning: zmq_utils.h is deprecated. All its functionality is provided by zmq.h.
   "Warning: zmq_utils.h is deprecated. All its functionality is provided by zmq.h.")
                                                                                    ^
In file included from ../node_modules/nan/nan.h:190,
                 from ../binding.cc:38:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
micahriggan commented 5 years ago

The master branch should be compatible with node 10, I am running it now.

If you have issues with it, try deleting the node_modules folder in all the packages and redoing npm install, so you can get native modules compiled for that version of node.

rm -rf packages/*/node_modules