我目前正尝试通过node.js以无线方式与Johnny Five建立我的ESP8266。为此,我需要通过TCP获得虚拟串行端口。我发现了一个非常有前景的节点模块,但我无法安装它。我已经浏览网页很长一段时间了。我安装了Windows 8.1 SDK,包括c ++编译器,windows构建工具,node-gyp(这基本上是所有其他东西的原因)但现在我完全陷入困境,因为我不知道该怎么做的错误。
这是我从
获得pacakage的地方https://github.com/sizuhiko/tcpsocket-serialport
这些是错误(对于乱七八糟的抱歉)
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
serialport.cpp
serialport_win.cpp
enumser.cpp
win_delay_load_hook.cc
..\src\win\enumser.cpp(443): warning C4996: 'GetVersionExA': was declared deprecated [C:\Users\chris\OneDrive\P
rogrammieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\
serialport.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433): note: see declaration of 'GetVersionExA
'
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)': function template has alread
y been defined (compiling source file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduin
o\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal' (compiling source file ..\src\serialport
.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2123): warning C4311: 'reinterpret_cast': pointer truncation from 'const
void *' to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmier
en\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport
.vcxproj]
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\serialport\src\win\stdstring.h(2117): note: while compiling class template member function 'bool CS
tdStr<wchar_t>::TryLoad(const void *)' (compiling source file ..\src\win\enumser.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\serialport\src\win\stdstring.h(2171): note: see reference to function template instantiation 'bool
CStdStr<wchar_t>::TryLoad(const void *)' being compiled (compiling source file ..\src\win\enumser.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\serialport\src\win\stdstring.h(3982): note: see reference to class template instantiation 'CStdStr<
wchar_t>' being compiled (compiling source file ..\src\win\enumser.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2123): warning C4302: 'reinterpret_cast': truncation from 'const void *'
to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\
arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj
]
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2126): warning C4311: 'reinterpret_cast': pointer truncation from 'const
void *' to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmier
en\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport
.vcxproj]
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2126): warning C4302: 'reinterpret_cast': truncation from 'const void *'
to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\
arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj
]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (compiling sour
ce file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialpor
t\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' (compiling source file ..\src\se
rialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\jo
hnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_object_wrap.h(8): note: see declaration of 'node' (compiling
source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' (compiling source file ..\src\seri
alport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\john
ny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier (compiling source file ..\src\serialport
.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-fiv
e\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier (compiling source file ..\src\serialport.cpp
) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\no
de_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argumen
t types (compiling source file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\te
st2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(46): note: could be 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,char *,std::size_t)' (compiling source file ..\src\serialport.cpp)
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(34): note: or 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)' (compiling source file ..\src\serialport.
cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32
_t)' (compiling source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v
8::Object>' (compiling source file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\j
f\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution
was ambiguous (compiling source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' (compiling source file ..\src\ser
ialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\joh
nny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(11): note: see declaration of 'node::Buffer' (compi
ling source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C3861: 'Use': identifier not found (compiling source file ..\src\serialport.cpp)
[C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node
_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)': function template has alread
y been defined (compiling source file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\ar
duino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal' (compiling source file ..\src\serialport
_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (compiling sour
ce file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-seria
lport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' (compiling source file ..\src\se
rialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_module
s\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_object_wrap.h(8): note: see declaration of 'node' (compiling
source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' (compiling source file ..\src\seri
alport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\
johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier (compiling source file ..\src\serialport
_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny
-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier (compiling source file ..\src\serialport_win
.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-fiv
e\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argumen
t types (compiling source file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\j
f\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(46): note: could be 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,char *,std::size_t)' (compiling source file ..\src\serialport_win.cpp)
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(34): note: or 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)' (compiling source file ..\src\serialport_
win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32
_t)' (compiling source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v
8::Object>' (compiling source file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\ardui
no\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution
was ambiguous (compiling source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' (compiling source file ..\src\ser
ialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules
\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(11): note: see declaration of 'node::Buffer' (compi
ling source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C3861: 'Use': identifier not found (compiling source file ..\src\serialport_win.c
pp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\
node_modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(152): warning C4311: 'type cast': pointer truncation from 'HANDLE' to 'int' [C:\Users
\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\
serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(152): warning C4302: 'type cast': truncation from 'HANDLE' to 'int' [C:\Users\chris\O
neDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialpo
rt\build\serialport.vcxproj]
..\src\serialport_win.cpp(177): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(179): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(183): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(185): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(189): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(191): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(196): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(208): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(308): warning C4311: 'type cast': pointer truncation from 'HANDLE' to 'int' [C:\Users
\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\
serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(308): warning C4302: 'type cast': truncation from 'HANDLE' to 'int' [C:\Users\chris\O
neDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialpo
rt\build\serialport.vcxproj]
..\src\serialport_win.cpp(318): warning C4311: 'type cast': pointer truncation from 'HANDLE' to 'int' [C:\Users
\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\
serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(318): warning C4302: 'type cast': truncation from 'HANDLE' to 'int' [C:\Users\chris\O
neDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialpo
rt\build\serialport.vcxproj]
..\src\serialport_win.cpp(328): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(353): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(366): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(401): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(403): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(502): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(511): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\chris\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:285: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.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\chris\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\chris\\OneDrive\\Programmieren\\Code\\arduino\\jf\\test2\\tcpsocket-serialport\\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\\chris\\OneDrive\\Programmieren\\Code\\arduino\\jf\\test2\\tcpsocket-serialport\\node_modules\\johnny-five\\node_modules\\serialport\\build\\serialport\\v1.7.4\\Release\\node-v46-win32-x64"
gyp ERR! cwd C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport
gyp ERR! node -v v4.6.1
gyp ERR! node-gyp -v v3.6.0
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\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\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\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\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.<anonymous> (C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\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:829: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.15063
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\chris\\OneDrive\\Programmieren\\Code\\arduino\\jf\\test2\\tcpsocket-serialport\\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\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport
node-pre-gyp ERR! node -v v4.6.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\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\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\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64' (1)
tcpsocket-serialport@0.1.0 C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport
+-- del@1.2.1
| +-- each-async@1.1.1
| | +-- onetime@1.1.0
...
| +-- string_decoder@1.0.1
| | `-- safe-buffer@5.0.1 deduped
| `-- util-deprecate@1.0.2 deduped
`-- jsdoctypeparser@1.2.0
`-- lodash@3.10.1
npm WARN tcpsocket-serialport@0.1.0 license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: serialport@1.7.4 (node_modules\johnny-five\node_modules\serialport):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: serialport@1.7.4 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
我找到的另一个包是
https://www.npmjs.com/package/tcp-serial
可悲的是它说ist tcp但是如果你尝试给定的例子它只是给你错误信息,它只适用于udp。无论如何,如果有人知道如何让这两个中的任何一个运行,我真的很感激。我仍然会尝试自己解决这个问题,如果找到答案,我一定要发一个答案。提前致谢并
问候克里斯
答案 0 :(得分:0)
事实证明,一旦我查看了package.json,这个错误就非常明显了。
问题是我已将johnny-five包含在父文件夹中,导致此处发生冲突。因此,如果有人碰巧遇到同样的问题,请不要安装johnny five并尝试安装tcpsocket-serialport。