This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
Incompatibility with nan 2.2.0 #12
Closed
Description
openedon Jan 10, 2016
npm install uwp
gave me some compile errors (please forgive my localized msbuild printing some messages in French):
"C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\binding.sln" (cible par défaut) (1) ->
"C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj" (cible par défaut) (2) ->
(ClCompile cible) ->
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(135): warning C4005: 'TYPE_CHECK': macro redefinition [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
"C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\binding.sln" (cible par défaut) (1) ->
"C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj" (cible par défaut) (2) ->
(ClCompile cible) ->
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(605): error C2039: 'GCCallback': is not a member of 'v8::Isolate' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(605): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(605): error C2146: syntax error: missing ';' before identifier 'GCEpilogueCallback' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(606): error C2039: 'GCCallback': is not a member of 'v8::Isolate' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(611): error C2146: syntax error: missing ')' before identifier 'callback' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(611): error C2143: syntax error: missing ';' before '{' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(611): error C2447: '{': missing function header (old-style formal list?) [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(616): error C2146: syntax error: missing ')' before identifier 'callback' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(616): error C2143: syntax error: missing ';' before '{' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(616): error C2447: '{': missing function header (old-style formal list?) [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(623): error C2664: 'void v8::Isolate::AddGCPrologueCallback(v8::Isolate::GCPrologueCallback,v8::GCType)': cannot convert argument 1 from 'Nan::GCPrologueCallback' to 'v8::Isolate ::GCPrologueCallback' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
C:\Dropbox\Coding\bb8-2\node_modules\nan\nan.h(628): error C2664: 'void v8::Isolate::RemoveGCPrologueCallback(v8::Isolate::GCPrologueCallback)': cannot convert argument 1 from 'Nan::GCPrologueCallback' to 'v8::Isolate::GCProl ogueCallback' [C:\Dropbox\Coding\bb8-2\node_modules\uwp\build\uwp.vcxproj]
Since the errors were clearly complaining about nan, I thought I would check the version of nan that was used. Your package.json
mentions ^2.1.0
, which resolved to 2.2.0
. I guessed that maybe you didn't test uwp
with nan 2.2.0
, so I cloned this repo on my disk, changed the nan version in package.json
to ~2.1.0
, ran npm i /path/to/my/cloned/uwp
and it worked.
So maybe nan messed up and there is a breaking change between 2.1 and 2.2, or maybe uwp is using some internal nan APIs that were changed between 2.1 and 2.2. Anyway, a quick fix is to change the package.json
nan dependency to ~2.1.0
or even 2.1.0
.
Metadata
Assignees
Labels
No labels