Nodejs mongojs 安装报错
Nodejs mongojs install error
我在通过 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 本机安装正常,但必须先安装 visual studio 才能使其正常工作。
谁能解释一下这是怎么回事?
不太理想,但我重新安装了 node 和 visual studio,现在一切正常
我在通过 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 本机安装正常,但必须先安装 visual studio 才能使其正常工作。
谁能解释一下这是怎么回事?
不太理想,但我重新安装了 node 和 visual studio,现在一切正常