Can't compile with node 10
Closed this issue ยท 7 comments
So npm install
in a node 10 environment throws the error:
In file included from ../../nan/nan.h:190:
../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
~~~ ^
And the install fails.
This is a bug in node-osx-audio probably, although it's difficult to tell from the above error message. Can you post the full log of the npm install, so we can see where that build error is coming from?
This library doesn't have an official maintainer any longer, and I no longer have a macOS machine to test on, so I can't confirm or deny that it works on node 10 myself.
Sure
/usr/local/bin/chromecast -> /usr/local/lib/node_modules/chromecast-osx-audio/bin/chromecast.js
> osx-audio@1.0.0 install /usr/local/lib/node_modules/chromecast-osx-audio/node_modules/osx-audio
> node-gyp rebuild
CXX(target) Release/obj.target/audio/src/bindings.o
In file included from ../src/bindings.cc:1:
In file included from ../../nan/nan.h:190:
../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../src/bindings.cc:1:
../../nan/nan.h:816:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/bindings.cc:1:
../../nan/nan.h:830:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/bindings.cc:1:
../../nan/nan.h:844:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/bindings.cc:1:
../../nan/nan.h:1457:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/myuser/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
4 warnings and 1 error generated.
make: *** [Release/obj.target/audio/src/bindings.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 ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/Cellar/node/10.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/chromecast-osx-audio/node_modules/osx-audio
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! osx-audio@1.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the osx-audio@1.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myuser/.npm/_logs/2018-05-03T16_53_56_438Z-debug.log
OK, yeah; there's probably an update to the C++ bindings that needs to be updated; there's a good chance that just the nan library needs to be updated in osx-audio. I'm going to open an issue there noting your stacktrace, in hopes that someone can pick up the issue to fix it, since I don't have the hardware to do so any longer. I'll leave this issue open here and link it to the one I open on osx-audio
.
I just tried to compile with node@10.2.1 and had no issues except few warnings.
@larssn which version do you use?
It was 10.0.0.
I'll try and update.
Yes, Node 10.2.1 fixes the problem. Closing.
Missed it, glad it's back! My 2010 MBP speakers were never good and are totally blown out. I can only get quality sound using your chromecast, so thank you for this!