node-gyp: build the hello world demo failed on win10 creator
I use ms build 2015 on win10 , and last month I update my win10 to creator version, but today I came cross a inexplicable problem, node-gyp build the hello world demo supplied by official docs with errors. node-gyp had build everything successfully before, I don’t know weather the update to win10 creator lead the problem.
E:\kuaipan\code\node2\myapp\chapter10\hello>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@6.9.2 | win32 | x64
gyp info spawn msbuild
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
hello.cc
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(345): error C2988: unrecognizable template declaration/definition [E:\
kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(345): error C2059: syntax error : 'using' [E:\kuaipan\code\node2\myapp
\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(481): error C2988: unrecognizable template declaration/definition [E:\
kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(481): error C2059: syntax error : 'using' [E:\kuaipan\code\node2\myapp
\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(592): error C2061: syntax error : identifier 'WeakCallbackType' [E:\ku
aipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(672) : see reference to class template instantiation 'v8::Pe
rsistentBase<T>' being compiled
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(667): error C2253: 'PersistentBase<T>' : pure specifier or abstract ov
erride specifier only allowed on virtual function [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(874): error C2253: 'Global<T>' : pure specifier or abstract override s
pecifier only allowed on virtual function [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(877) : see reference to class template instantiation 'v8::Gl
obal<T>' being compiled
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(882): error C2988: unrecognizable template declaration/definition [E:\
kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(882): error C2059: syntax error : 'using' [E:\kuaipan\code\node2\myapp
\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(945): error C2989: 'v8::HandleScope' : class template has already been
declared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(328) : see declaration of 'v8::HandleScope'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(979): error C2989: 'v8::EscapableHandleScope' : class template has alr
eady been declared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(139) : see declaration of 'v8::EscapableHandleScope'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(1009): error C2989: 'v8::Data' : class template has already been decla
red as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(76) : see declaration of 'v8::Data'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(1143): error C2989: 'v8::Script' : class template has already been dec
lared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(99) : see declaration of 'v8::Script'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(1582): error C2989: 'v8::StackTrace' : class template has already been
declared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(104) : see declaration of 'v8::StackTrace'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(1645): error C2989: 'v8::StackFrame' : class template has already been
declared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(103) : see declaration of 'v8::StackFrame'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2060): error C2989: 'v8::Value' : class template has already been decl
ared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(112) : see declaration of 'v8::Value'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2066): error C2989: 'v8::Primitive' : class template has already been
declared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(95) : see declaration of 'v8::Primitive'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2081): error C2989: 'v8::Boolean' : class template has already been de
clared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(72) : see declaration of 'v8::Boolean'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2101): error C2989: 'v8::Name' : class template has already been decla
red as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(88) : see declaration of 'v8::Name'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2469): error C2989: 'v8::String' : class template has already been dec
lared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(105) : see declaration of 'v8::String'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2508): error C2989: 'v8::Symbol' : class template has already been dec
lared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(107) : see declaration of 'v8::Symbol'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2536): error C2989: 'v8::Private' : class template has already been de
clared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(109) : see declaration of 'v8::Private'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2550): error C2989: 'v8::Number' : class template has already been dec
lared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(89) : see declaration of 'v8::Number'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2565): error C2989: 'v8::Integer' : class template has already been de
clared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(84) : see declaration of 'v8::Integer'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2579): error C2989: 'v8::Int32' : class template has already been decl
ared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(83) : see declaration of 'v8::Int32'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(2593): error C2989: 'v8::Uint32' : class template has already been dec
lared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(110) : see declaration of 'v8::Uint32'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3015): error C2989: 'v8::Object' : class template has already been dec
lared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(91) : see declaration of 'v8::Object'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3045): error C2989: 'v8::Array' : class template has already been decl
ared as a non-class template [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(71) : see declaration of 'v8::Array'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3249): error C2504: 'v8::Object' : base class undefined [E:\kuaipan\co
de\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3256): error C2061: syntax error : identifier 'FunctionCallback' [E:\k
uaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3260): error C2061: syntax error : identifier 'FunctionCallback' [E:\k
uaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3263): error C2535: 'v8::MaybeLocal<F> v8::Function::New(v8::Local<T>)
' : member function already defined or declared [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
with
[
F=v8::Function,
T=v8::Context
]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3255) : see declaration of 'v8::Function::New'
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3267): error C2061: syntax error : identifier 'FunctionCallback' [E:\k
uaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3277): error C2059: syntax error : 'return' [E:\kuaipan\code\node2\mya
pp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3277): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3282): error C2146: syntax error : missing ';' before identifier 'Call
' [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3288): error C2270: 'GetName' : modifiers not allowed on nonmember fun
ctions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3296): error C2270: 'GetInferredName' : modifiers not allowed on nonme
mber functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3302): error C2270: 'GetDebugName' : modifiers not allowed on nonmembe
r functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3308): error C2270: 'GetDisplayName' : modifiers not allowed on nonmem
ber functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3314): error C2270: 'GetScriptLineNumber' : modifiers not allowed on n
onmember functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3319): error C2270: 'GetScriptColumnNumber' : modifiers not allowed on
nonmember functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3324): error C2270: 'IsBuiltin' : modifiers not allowed on nonmember f
unctions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3329): error C2270: 'ScriptId' : modifiers not allowed on nonmember fu
nctions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3335): error C2270: 'GetBoundFunction' : modifiers not allowed on nonm
ember functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3337): error C2270: 'GetScriptOrigin' : modifiers not allowed on nonme
mber functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3341): error C2059: syntax error : 'private' [E:\kuaipan\code\node2\my
app\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3342): error C2059: syntax error : ')' [E:\kuaipan\code\node2\myapp\ch
apter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3351): error C2504: 'Object' : base class undefined [E:\kuaipan\code\n
ode2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3353): error C2504: 'Object' : base class undefined [E:\kuaipan\code\n
ode2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3359): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3359): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3359): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3360): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3360): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3361): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3366): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3366): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3366): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3372): error C2061: syntax error : identifier 'Local' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3374): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3374): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3374): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3376): error C2061: syntax error : identifier 'Local' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3378): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3378): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3378): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3380): error C2061: syntax error : identifier 'Value' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3384): error C2061: syntax error : identifier 'Value' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3394): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3394): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3394): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3397): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3397): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3397): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3400): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3400): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3400): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3401): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3401): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3402): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3405): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3405): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3405): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3406): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3406): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3407): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3415): error C2061: syntax error : identifier 'Value' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3419): error C2061: syntax error : identifier 'Value' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3427): error C2504: 'Object' : base class undefined [E:\kuaipan\code\n
ode2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3429): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3429): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3429): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3430): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3430): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3430): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3437): error C2143: syntax error : missing ';' before '<' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3437): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3439): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3441): error C2061: syntax error : identifier 'Value' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3445): error C2061: syntax error : identifier 'Value' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3462): error C2504: 'Object' : base class undefined [E:\kuaipan\code\n
ode2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3479): error C2628: 'ArrayBuffer::Allocator' followed by 'void' is ill
egal (did you forget a ';'?) [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3505): error C3861: 'data_': identifier not found [E:\kuaipan\code\nod
e2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3505): error C2461: 'Contents' : constructor syntax missing formal par
ameters [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3505): error C2059: syntax error : 'constant' [E:\kuaipan\code\node2\m
yapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3505): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3505): error C2143: syntax error : missing ';' before '{' [E:\kuaipan\
code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3505): error C2334: unexpected token(s) preceding '{'; skipping appare
nt function body [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3507): error C2059: syntax error : 'return' [E:\kuaipan\code\node2\mya
pp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3507): error C2238: unexpected token(s) preceding ';' [E:\kuaipan\code
\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3508): error C2146: syntax error : missing ';' before identifier 'Byte
Length' [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3508): error C2270: 'ByteLength' : modifiers not allowed on nonmember
functions [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3508): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3508): error C2065: 'byte_length_' : undeclared identifier [E:\kuaipan
\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3510): error C2059: syntax error : 'private' [E:\kuaipan\code\node2\my
app\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3514): error C2255: 'friend' : not allowed outside of a class definiti
on [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
c:\users\sunny\.node-gyp\6.9.2\include\node\v8.h(3514): fatal error C1003: error count exceeds 100; stopping compilatio
n [E:\kuaipan\code\node2\myapp\chapter10\hello\build\addon.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "d:\\Program Files\\nodejs\\node.exe" "d:\\Program Files\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd E:\kuaipan\code\node2\myapp\chapter10\hello
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (12 by maintainers)
It does. The issue here was that you overrode it through npm. If you run node-gyp directly, either pass
--msvs_version=...
on the command line or setnpm_config_msvs_version=...
in the environment (that is how node-gyp receives the option from npm.)node-gyp’s auto-detection usually does the right thing. It’s only when you have multiple compilers installed (as was the case here) that it may pick the wrong one.
npm config ...
only works when node-gyp is invoked by npm, not when you run node-gyp directly.Happy to hear it’s working now, I’ll close this out.
I uninstalled the VS2012 , only left msbuild 2015 in my pc. But another error happened:
error output of node-gyp rebuild --verbose I found that the build project generated in the folder of
build
is namedaddon.vcproj
, which should been created by Visual Studio, but Visual Studio is not installed in my pc, finally, it resulted in the error “loading VCBuild.exe (which supplied by Visual Studio) failed”. I had tried many method to solve it but failed. At last I rannode-gyp rebuild --msvs_version=2015
, a miracle happened, everything worked OK. And the project file inbuild
folder has the name ofaddon.vcxproj
now. I tried to runnpm config set msvs_version 2015 --global
, but after ran it , I found it helpless.