Проблема в сборке Converse.js на окнах
Я пытаюсь собрать Converse.js на моей машине с Windows. Я установил все необходимые предварительные условия, как указано на сайте. Однако я получаю проблемы при создании кода. Может кто-нибудь, пожалуйста, помогите мне с шагами, чтобы решить?
Вот проблема
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\8.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\8.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\8.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\8.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\8.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\8.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\8.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\8.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\8.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\8.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\8.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\8.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\8.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]
Я чувствую, что эта проблема возникает из-за неправильных версий GIP. Вот версии Node - v8.9.1 NPM - 5.5.1 Node-gyp - 8.9.1 Сообщите мне об изменениях, которые мне нужно сделать, чтобы решить эту проблему.
1 ответ
Я наконец решил свою проблему. Проблема возникла из-за несовместимой версии NodeJS. Как подсказал @Himanshu sharma в ответе, я проверил последнюю сборку cinverse.js, которая была 8 августа 17 года, и обнаружил выпуски NodeJS до этого. После того, как я установил соответствующую версию NodeJS, я смог решить проблему. В моем случае это работало с версией node-v4.8.4-x64