首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在windows上构建Converse.js中的问题

在windows上构建Converse.js中的问题
EN

Stack Overflow用户
提问于 2017-12-03 13:43:18
回答 1查看 167关注 0票数 0

我正试图在我的Windows机器上构建Converse.js。我已经安装了所有必要的先决条件,如网站上提到的。但是,我在构建代码时遇到了问题。有人能帮我解决这个问题吗?

以下是问题所在

代码语言:javascript
复制
    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]

我觉得这个问题是由于不正确的版本而来的。以下是Node - v8.9.1版本-NPM5.5.1 Node-gyp-8.9.1,让我知道为了解决这个问题需要做的更改。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-18 14:17:55

我终于解决了我的问题。问题是由于NodeJS版本不兼容造成的。正如@Himanshu在回复中所建议的那样,我查看了cinverse.js的最后一个版本,该版本是在8月8日‘17日,并在此之前找到了NodeJS版本。一旦我安装了适当的NodeJS版本,我就可以解决问题了。在我的例子中,它与版本节点-v4.8.4-x64一起工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47618992

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档