Nodejs mongojs安装错误

时间:2015-02-23 11:08:31

标签: node.js mongodb npm mongojs

我在通过npm安装mongojs时遇到了一些问题。每当我尝试安装它时(在Windows 8上)我只会得到一个充满红色错误的页面。其中有很多我甚至不知道从哪里开始,下面是他们的样本(这可能是总错误的1/10):

c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(52): error C4430:
 missing type specifier - int assumed. Note: C++ does not support default-int (
..\lib\win32\wrappers\security_credentials.cc) [C:\Users\Simon\AppData\Roaming\
npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerbe
ros.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(47): error C2039:
 'HasInstance' : is not a member of 'v8::Persistent<v8::FunctionTemplate,v8::No
nCopyablePersistentTraits<T>>' [C:\Users\Simon\AppData\Roaming\npm\node_modules
\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]


c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(52): error C2143:
 syntax error : missing ',' before '&' (..\lib\win32\wrappers\security_credenti
als.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\m
ongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(53): error C4430:
 missing type specifier - int assumed. Note: C++ does not support default-int (
..\lib\win32\wrappers\security_credentials.cc) [C:\Users\Simon\AppData\Roaming\
npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerbe
ros.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(53): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(53): error C2143:
 syntax error : missing ',' before '&' (..\lib\win32\wrappers\security_credenti
als.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\m
ongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(53): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(54): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(54): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(56): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(56): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(60): error C4430:
 missing type specifier - int assumed. Note: C++ does not support default-int (
..\lib\win32\wrappers\security_credentials.cc) [C:\Users\Simon\AppData\Roaming\
npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerbe
ros.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(57): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(60): error C2143:
 syntax error : missing ',' before '&' (..\lib\win32\wrappers\security_credenti
als.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\m
ongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(57): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(57): fatal error C100
3: error count exceeds 100; stopping compilation (..\lib\win32\kerberos.cc) [C:
\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node
_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(47): error C2819:
 type 'v8::Persistent<v8::FunctionTemplate,v8::NonCopyablePersistentTraits<T>>'
 does not have an overloaded member 'operator ->' [C:\Users\Simon\AppData\Roami
ng\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\ke
rberos.vcxproj]

当我尝试安装mongoose时会发生同样的事情。 mongodb native安装好了但是必须先安装visual studio才能让它工作。

有谁能解释这里发生了什么?

1 个答案:

答案 0 :(得分:0)

不太理想,但我重新安装了节点和视觉工作室,现在似乎工作正常