moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 513 forks source link

Cannot build for Node 10 #782

Open cyrussalem opened 5 years ago

cyrussalem commented 5 years ago

When I do an 'npm install', I see the following compile error. It seems that it is due to the fact that the function Nan:ForceSet is now deprecated.

make: Entering directory '/home/smc-dev/github/bacnet-explorer/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
In file included from ../node_modules/nan/nan.h:190:0,
                 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);
ersutton commented 5 years ago

@cyrussalem Have you managed to find a way around this issue? Just stumbled across this myself.

mischah commented 4 years ago

Node 8 is also affected :(

I’m using nvm to run it with Node 6. But I hope this will be fixed.

gnomex commented 4 years ago

I'm using node v10.16.0 with mosca 2.8.3 and it's working

rssk commented 4 years ago

For others running into this issue, mosca is building 'fine' but has several opt dependencies failing on newer node, namely zmq, leveldown, snappy, and fs-ext.

If you need these, these issues for these failures can be found here https://github.com/mcollina/ascoltatori