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)

Most upvoted comments

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 set npm_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:

C:\Users\sunny\cadd\hello>node-gyp rebuild --verbose
gyp info it worked if it ends with ok
gyp verb cli [ 'd:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'd:\\Program Files\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose' ]
gyp info using node-gyp@3.6.1
gyp info using node@6.9.2 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:13:12)
gyp verb `which` failed     at F (d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:68:19)
gyp verb `which` failed     at E (d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:80:29)
gyp verb `which` failed     at d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:89:16
gyp verb `which` failed     at d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._isexe@2.0.0@isexe\index.js:42:5
gyp verb `which` failed     at d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._isexe@2.0.0@isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:13:12)
gyp verb `which` failed     at F (d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:68:19)
gyp verb `which` failed     at E (d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:80:29)
gyp verb `which` failed     at d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._which@1.2.14@which\which.js:89:16
gyp verb `which` failed     at d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._isexe@2.0.0@isexe\index.js:42:5
gyp verb `which` failed     at d:\Users\sunny\AppData\Roaming\nvm\v6.9.2\node_modules\node-gyp\node_modules\._isexe@2.0.0@isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python D:\Python27\python.EXE
gyp verb check python version `D:\Python27\python.EXE -c "import platform; print(platform.python_version());"` returned: "2.7.12\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 6.9.2
gyp verb command install [ '6.9.2' ]
gyp verb install input version string "6.9.2"
gyp verb install installing version: 6.9.2
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 6.9.2
gyp verb build dir attempting to create "build" dir: C:\Users\sunny\cadd\hello\build
gyp verb build dir "build" dir needed to be created? C:\Users\sunny\cadd\hello\build
gyp verb Not using VS2017: Could not use PowerShell to find VS2017
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\sunny\cadd\hello\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Users\sunny\cadd\hello\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\sunny\cadd\hello\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn D:\Python27\python.EXE
gyp info spawn args [ 'd:\\Users\\sunny\\AppData\\Roaming\\nvm\\v6.9.2\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\sunny\\cadd\\hello\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'd:\\Users\\sunny\\AppData\\Roaming\\nvm\\v6.9.2\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\sunny\\.node-gyp\\6.9.2\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\sunny\\.node-gyp\\6.9.2',
gyp info spawn args   '-Dnode_gyp_dir=d:\\Users\\sunny\\AppData\\Roaming\\nvm\\v6.9.2\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\sunny\\cadd\\hello',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\sunny\\cadd\\hello\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\sunny\.node-gyp\6.9.2
gyp verb found first Solution file build/binding.sln
gyp verb `which` succeeded for `msbuild` C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.EXE
gyp verb "Release" dir needed to be created? null
gyp verb copying "node.lib" for x64 C:\Users\sunny\.node-gyp\6.9.2\Release\node.lib
gyp info spawn msbuild
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
生成启动时间为 2017/6/3 17:04:24。
节点 1 上的项目“C:\Users\sunny\cadd\hello\build\binding.sln”(默认目标)。
ValidateSolutionConfiguration:
  正在生成解决方案配置“Release|x64”。
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了其 他位置,请将其位置添加到系统路径中。 [C:\Users\sun
ny\cadd\hello\build\binding.sln]
已完成生成项目“C:\Users\sunny\cadd\hello\build\binding.sln”(默认目标)的操作 - 失败。


生成失败。

“C:\Users\sunny\cadd\hello\build\binding.sln”(默认目标) (1) ->
(addon 目标) ->
  MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了 其他位置,请将其位置添加到系统路径中。 [C:\Users\s
unny\cadd\hello\build\binding.sln]

    0 个警告
    1 个错误

已用时间 00:00:00.11
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:285: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" "rebuild" "--verbose"
gyp ERR! cwd C:\Users\sunny\cadd\hello
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok

error output of node-gyp rebuild --verbose I found that the build project generated in the folder of build is named addon.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 ran node-gyp rebuild --msvs_version=2015, a miracle happened, everything worked OK. And the project file in build folder has the name of addon.vcxproj now. I tried to run npm config set msvs_version 2015 --global, but after ran it , I found it helpless.