在 windows 上构建 Converse.js 时出现问题
Issue in building Converse.js on windows
我正在尝试在我的 Windows 机器上构建 Converse.js。我已经安装了网站上提到的所有必需的先决条件。但是我在构建代码时遇到问题。有人可以帮我解决问题吗?
问题来了
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(339): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(339): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(348): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(348): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(355): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(355): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(357): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(357): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(357): error C2660: 'v8::Integer::New': function does not take
1 arguments (compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThread
s.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(369): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(369): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(377): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(377): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(408): error C3083: 'smalloc': the symbol to the left of a '::'
must be a type (compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerTh
reads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(408): error C2039: 'FreeCallback': is not a member of 'node' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\node_object_wrap.h(29): note: see declaration of 'node' (compiling source file ..\src\WebWorke
rThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(408): error C2061: syntax error: identifier 'FreeCallback' (co
mpiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(409): error C2065: 'callback': undeclared identifier (compilin
g source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(409): error C2065: 'hint': undeclared identifier (compiling so
urce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(416): error C2665: 'node::Buffer::New': none of the 4 overload
s could convert all the argument types (compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-th
reads\build\WebWorkerThreads.vcxproj]
我觉得这个问题是由于 gyp 版本不正确造成的。这是版本
节点 - v8.9.1
NPM-5.5.1
节点 gyp - 8.9.1
请让我知道我需要做哪些更改才能解决此问题。
我终于解决了我的问题。问题是由于 NodeJS 的版本不兼容。正如@Himanshu sharma 在回复中所建议的那样,我检查了 17 年 8 月 8 日的 cinverse.js 的最后一个版本,并在此之前找到了 NodeJS 版本。一旦我安装了适当版本的 NodeJS,我就可以解决问题。就我而言,它适用于版本 node-v4.8.4-x64
我正在尝试在我的 Windows 机器上构建 Converse.js。我已经安装了网站上提到的所有必需的先决条件。但是我在构建代码时遇到问题。有人可以帮我解决问题吗?
问题来了
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(339): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(339): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(343): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(348): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(348): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(355): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(355): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(357): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(357): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(357): error C2660: 'v8::Integer::New': function does not take
1 arguments (compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThread
s.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(369): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(369): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(373): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(377): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(377): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C2039: 'ThrowException': is not a member of 'v8' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(64): note: see declaration of 'v8' (compiling source file ..\src\WebWorkerThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C2039: 'New': is not a member of 'v8::String' (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\v8.h(2443): note: see declaration of 'v8::String' (compiling source file ..\src\WebWorkerThrea
ds.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C3861: 'New': identifier not found (compiling sour
ce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(381): error C3861: 'ThrowException': identifier not found (com
piling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(408): error C3083: 'smalloc': the symbol to the left of a '::'
must be a type (compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerTh
reads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(408): error C2039: 'FreeCallback': is not a member of 'node' (
compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\Users\rphatak\.node-gyp.9.1\include\node\node_object_wrap.h(29): note: see declaration of 'node' (compiling source file ..\src\WebWorke
rThreads.cc)
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(408): error C2061: syntax error: identifier 'FreeCallback' (co
mpiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(409): error C2065: 'callback': undeclared identifier (compilin
g source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(409): error C2065: 'hint': undeclared identifier (compiling so
urce file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]
D:\SourceCode\converse.js\node_modules\webworker-threads\node_modules\nan\nan.h(416): error C2665: 'node::Buffer::New': none of the 4 overload
s could convert all the argument types (compiling source file ..\src\WebWorkerThreads.cc) [D:\SourceCode\converse.js\node_modules\webworker-th
reads\build\WebWorkerThreads.vcxproj]
我觉得这个问题是由于 gyp 版本不正确造成的。这是版本 节点 - v8.9.1 NPM-5.5.1 节点 gyp - 8.9.1 请让我知道我需要做哪些更改才能解决此问题。
我终于解决了我的问题。问题是由于 NodeJS 的版本不兼容。正如@Himanshu sharma 在回复中所建议的那样,我检查了 17 年 8 月 8 日的 cinverse.js 的最后一个版本,并在此之前找到了 NodeJS 版本。一旦我安装了适当版本的 NodeJS,我就可以解决问题。就我而言,它适用于版本 node-v4.8.4-x64