Closed jacobrosenthal closed 8 years ago
@imyller Thank you for your advice.
Indeed, I only get visual studio 2012 installed which doesn't meet the building requirements
@alexcroox It looks like Raspbian Wheezy is installed on the Pi. If so, this should help: https://github.com/fivdi/onoff/wiki/Node.js-v4-and-native-addons
Built using these instructions and everything is working great thank you :)
http://andyfelong.com/2015/09/node-js-v4-1-0-on-raspberry-pi-2/
Hi,
I'm new at this but i'm trying to get pass to the proccess of "building serialport" to use it with johnny-five.
I keep getting this error and tried everything. Installed python 2.7, set the env. variable. I have Visual Studio 2013, etc.
Error log:
serialport@1.7.4 install C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport node-pre-gyp install --fallback-to-build
C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node clean )
C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" ) else (node configure --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" )
C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" ) else (node build --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" ) Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar la compilación en paralelo, agregue el modificador "/m". serialport.cpp serialport_win.cpp enumser.cpp ..\src\win\enumser.cpp(443): warning C4996: 'GetVersionExA': was declared deprecated [C:\Users\andres garcia.WebStorm1 0\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433) : see declaration of 'GetVersionExA' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(263): error C2995: 'v8::Local
_NanEnsureLocal(v8::Local )' : function template has already been defined (..\src\ serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\buil d\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_module s\nan\nan.h(256) : see declaration of '_NanEnsureLocal' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(263): error C2995: 'v8::Local _NanEnsureLocal(v8::Local )' : function template has already been defined (..\src\ serialport_win.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\ build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_module s\nan\nan.h(256) : see declaration of '_NanEnsureLocal' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (..\src\serialport.cpp) [C:\Users\andre s garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2039: 'FreeCallback' : is not a member of 'node' (..\src\serialport.cpp) [C:\Users\andres garcia.WebSto rm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2061: syntax error : identifier 'FreeCallback' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm 10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'callback' : undeclared identifier (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGN odeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'hint' : undeclared identifier (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeA rduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm1 0\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types (..\src\serialp ort.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\seria lport.vcxproj] C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(43): could be 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,char ,size_t)' C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(31): or 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,v8::Localv8::String,node::encoding)' while trying to match the argument list '(v8::Isolate , const char , uint32_t)' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (..\src\serialport_win.cpp) [C:\Users\a ndres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2039: 'FreeCallback' : is not a member of 'node' (..\src\serialport_win.cpp) [C:\Users\andres garcia.We bStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(676): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm1 0\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2061: syntax error : identifier 'FreeCallback' (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebS torm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C2039: 'Use' : is not a member of 'node::Buffer' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStor m10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'callback' : undeclared identifier (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebStorm10 \AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C3861: 'Use': identifier not found (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArdu ino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'hint' : undeclared identifier (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebStorm10\AGN odeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebSt orm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types (..\src\serialp ort_win.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\s erialport.vcxproj] C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(43): could be 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,char ,size_t)' C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(31): or 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,v8::Localv8::String,node::encoding)' while trying to match the argument list '(v8::Isolate , const char , uint32_t)' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(676): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebSt orm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C2039: 'Use' : is not a member of 'node::Buffer' (..\src\serialport_win.cpp) [C:\Users\andres garcia.Web Storm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C3861: 'Use': identifier not found (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebStorm10\AGNode Arduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 10.0.10240 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" "--module_name=serialport" "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" gyp ERR! cwd C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64' (1) node-pre-gyp ERR! stack at ChildProcess.(C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:87:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:818:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) node-pre-gyp ERR! System Windows_NT 10.0.10240 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport node-pre-gyp ERR! node -v v4.2.1 node-pre-gyp ERR! node-pre-gyp -v v0.6.7 node-pre-gyp ERR! not ok Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64' (1) npm WARN optional dep failed, continuing serialport@1.7.4
Please help, any advice would be appreciated. Thanks in advance!
Hi there.
I see that you have Windows 10 (System Windows_NT 10.0.10240) but are still running Windows SDK 8.1 (C:\Program Files (x86)\Windows Kits\8.1\ ...).
Three things that I can think of, that I have had to do on my system:
Hope this helps.
Michael
On Mon, Oct 19, 2015 at 2:12 AM, andresg747 notifications@github.com wrote:
Hi,
I'm new at this but i'm trying to get pass to the proccess of "building serialport" to use it with johnny-five.
I keep getting this error and tried everything. Installed python 2.7, set the env. variable. I have Visual Studio 2013, etc.
Error log:
serialport@1.7.4 install C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport node-pre-gyp install --fallback-to-build
C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node clean )
C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" ) else (node configure --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" )
C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" ) else (node build --fallback-to-build "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" --module_name=serialport "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" ) Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar la compilación en paralelo, agregue el modificador "/m". serialport.cpp serialport_win.cpp enumser.cpp ..\src\win\enumser.cpp(443): warning C4996: 'GetVersionExA': was declared deprecated [C:\Users\andres garcia.WebStorm1
0\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433) : see declaration of 'GetVersionExA' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(263): error C2995: 'v8::Local _NanEnsureLocal(v8::Local)' : function template has already been defined (..\src\ serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\buil d\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_module s\nan\nan.h(256) : see declaration of '_NanEnsureLocal' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(263): error C2995: 'v8::Local _NanEnsureLocal(v8::Local)' : function template has already been defined (..\src\ serialport_win.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\ build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_module s\nan\nan.h(256) : see declaration of '_NanEnsureLocal' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (..\src\serialport.cpp) [C:\Users\andre s garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2039: 'FreeCallback' : is not a member of 'node' (..\src\serialport.cpp) [C:\Users\andres garcia.WebSto
rm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2061: syntax error : identifier 'FreeCallback' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm
10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'callback' : undeclared identifier (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGN
odeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'hint' : undeclared identifier (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeA
rduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm1
0\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types (..\src\serialp ort.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\seria lport.vcxproj] C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(43): could be 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,char ,size_t)' C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(31): or 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,v8::Localv8::String,node::encoding)' while trying to match the argument list '(v8::Isolate , const char *, uint32_t)' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (..\src\serialport_win.cpp) [C:\Users\a ndres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2039: 'FreeCallback' : is not a member of 'node' (..\src\serialport_win.cpp) [C:\Users\andres garcia.We
bStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(676): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm1
0\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(661): error C2061: syntax error : identifier 'FreeCallback' (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebS
torm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C2039: 'Use' : is not a member of 'node::Buffer' (..\src\serialport.cpp) [C:\Users\andres garcia.WebStor
m10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'callback' : undeclared identifier (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebStorm10
\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C3861: 'Use': identifier not found (..\src\serialport.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArdu
ino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2065: 'hint' : undeclared identifier (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebStorm10\AGN
odeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(665): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebSt
orm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types (..\src\serialp ort_win.cpp) [C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\s erialport.vcxproj] C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(43): could be 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,char ,size_t)' C:\Users\andres garcia.node-gyp\4.2.1\include\node\node_buffer.h(31): or 'v8::MaybeLocalv8::Object n ode::Buffer::New(v8::Isolate ,v8::Localv8::String,node::encoding)' while trying to match the argument list '(v8::Isolate , const char *, uint32_t)' C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(676): error C2664: 'v8::Localv8::Object::Local(const v8::Localv8::Object &)' : cannot convert argument 1 from 'v8 ::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebSt
orm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] Reason: cannot convert from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal led C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C2039: 'Use' : is not a member of 'node::Buffer' (..\src\serialport_win.cpp) [C:\Users\andres garcia.Web
Storm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\nan\nan. h(683): error C3861: 'Use': identifier not found (..\src\serialport_win.cpp) [C:\Users\andres garcia.WebStorm10\AGNode
Arduino\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 10.0.10240 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node" "--module_name=serialport" "--module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64" gyp ERR! cwd C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:87:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:818:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) node-pre-gyp ERR! System Windows_NT 10.0.10240 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport node-pre-gyp ERR! node -v v4.2.1 node-pre-gyp ERR! node-pre-gyp -v v0.6.7 node-pre-gyp ERR! not ok Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\andres garcia.WebStorm10\AGNodeArduino\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64' (1) npm WARN optional dep failed, continuing serialport@1.7.4
Please help, any advice would be appreciated. Thanks in advance!
— Reply to this email directly or view it on GitHub https://github.com/voodootikigod/node-serialport/issues/578#issuecomment-149066180 .
I've just tried serialport@2.0.1 with node 4.2.1 and I'm still seeing the same symptom as my previous comment (https://github.com/voodootikigod/node-serialport/issues/578#issuecomment-143591608)
Here's my latest, trying this on Windows 10:
I tried under Windows 10. At first I tried using the GitHub Shell that comes with the GitHub GUI client for Windows. I couldn’t ever get it to build there, so I closed that and just opened Windows PowerShell. In powershell, I changed into a directory for a project I was working on (https://github.com/vanevery/p5.serialport), and did this:
git install serialport—msgs_version=2015
Some warnings popped up, but it compiled OK.
Then I ran the server script for that project (it's a serial-to-websocket server for p5.js):
node startserver
And opened the echo2 example in PR#15 of p5.serialport. I had loaded up echo.ino.ino on the Arduino already. Changed the portName appropriately (COM4 for me) and ran it. It crashed after about 18, 19 reads pretty consistently.
Then I loaded up my own node serial examples (https://github.com/tigoe/NodeExamples). Installed like so:
npm install
Note: no msds_ver flag. It worked fine, after the same warnings as above.
Ran SerialIn.js with analogReadSerial example from Arduino Examples -> Basics folder. Converted Arduino output to binary (using .write()) and tried it with SerialInBinary as well. In both cases, the script stopped running after 400-600 bytes received.
No idea why yet, but I can repeat it pretty consistently with the steps above.
Closing this as it was merged for 2.0.0. Looks like mainly whats left is windows issues, which well track on separate issues
@jacobrosenthal I also got this working in the end, following the same advice as @alexcroox. This was on an nvm-installed node 4.2.2 on the RPI2 (Raspbian GNU/Linux 7 (wheezy))
Steps taken: https://gist.github.com/torgeir/89ec54bbc6cf80d8bff4
For anyone wondering, I can confirm that git://github.com/ghostoy/node-serialport.git#nan1to2 is working swimmingly on 4.2.2 installed via nvm on a BeagleBoneBlack RevC with a fresh headless install of Debian 8.2 (Jessie). for anyone reading this on a minimal install remember to sudo apt-get git build-essential python
Well done and thank you. log for posterity:
npm WARN installMany node-pre-gyp was bundled with serialport@1.7.4, but bundled package wasn't found in unpacked tree
-
> serialport@1.7.4 install /home/debian/test/node_modules/serialport
> node-pre-gyp install --fallback-to-build
make: Entering directory '/home/debian/test/node_modules/serialport/build'
CXX(target) Release/obj.target/serialport/src/serialport.o
CXX(target) Release/obj.target/serialport/src/serialport_unix.o
CXX(target) Release/obj.target/serialport/src/serialport_poller.o
SOLINK_MODULE(target) Release/obj.target/serialport.node
COPY Release/serialport.node
COPY /home/debian/test/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-arm/serialport.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/debian/test/node_modules/serialport/build'
serialport@1.7.4 node_modules/serialport
├── bindings@1.2.1
├── async@0.9.0
├── sf@0.1.7
├── debug@2.2.0 (ms@0.7.1)
├── nan@2.0.9
├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
└── node-pre-gyp@0.6.17
debian@beaglebone:~/test$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="https://bugs.debian.org/"
debian@beaglebone:~/test$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)
Doesnt look like nan2.x will be a breaking change and still supports all node versions we support, ie this will not be a major release
566 is the PR we're working on. It appears to be generated by one of the following migration scripts update_to_nan_v2.0.x.sh 1to2.js
If youd like to get ahead of us and use node4, or speed up the process npm install "git://github.com/ghostoy/node-serialport.git#nan1to2" and report your findings here
Weve got two windows issues that need reproduction and fixing:
Im contacting Chris about publishing and especially around all the changes to the travis file which also seems to be involved in publishing.
In my mind we merge a travis update so we can see whats up, then cherry pick or merge those PRs.
But let me reiterate, were not going to be able to support nan2 (and thus node 4) until we get some windows testers and feedback Long term we're working on CI'ing this problem away (see https://github.com/nodejs/hardware/issues/13 ) but we're not there yet.