Closed Furtif closed 6 years ago
@Furtif I can't possibly help you with log like this, sorry. Make sure you followed node-gyp installation guide and toolchain is compatible with VS2017 (I think it's not).
PS C:\Users\msntc\Source\Repos\node-protobuf> node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@5.4.1 | win32 | x64
gyp info spawn C:\Users\msntc.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\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=2015',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\msntc\Source\Repos\node-protobuf\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\msntc\.node-gyp\5.4.1\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\msntc\.node-gyp\5.4.1',
gyp info spawn args '-Dnode_gyp_dir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\Users\msntc\.node-gyp\5.4.1\<(target_arch)\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Users\msntc\Source\Repos\node-protobuf',
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\msntc\Source\Repos\node-protobuf\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
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' ]
Les projets sont générés individuellement dans cette solution. Pour activer la génération en parallèle, ajoutez le commutateur "/m".
init.cpp
native.cpp
parse.cpp
serialize.cpp
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'return' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier so
urce ..\src\native.cpp) [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'return' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier so
urce ..\src\parse.cpp) [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'return' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier so
urce ..\src\init.cpp) [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'return' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier so
urce ..\src\serialize.cpp) [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(49): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(126): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(131): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(181): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(186): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\parse.cpp(144): warning C4267: 'argument' : conversion de 'size_t' en 'uint32_t', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(37): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::int64', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(50): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::int64', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(72): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::uint64', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(85): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::uint64', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(96): warning C4244: 'argument' : conversion de 'double' en 'float', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(98): warning C4244: 'argument' : conversion de 'double' en 'float', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(207): warning C4267: '=' : conversion de 'size_t' en 'uint32_t', perte possible de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
c:\users\msntc\source\repos\node-protobuf\node_modules\nan\nan_new.h(208): warning C4244: 'argument' : conversion de 'google::protobuf::int64' en 'double', perte possible de données (compilation du fichier sour
ce ..\src\parse.cpp) [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\parse.cpp(60): note: voir la référence à l'instanciation de la fonction modèle 'v8::Local
PS C:\Users\msntc\Source\Repos\node-protobuf> npm test
node-protobuf@1.4.3 test C:\Users\msntc\Source\Repos\node-protobuf mocha ./test/test.js -R spec
C:\Users\msntc\Source\Repos\node-protobuf\node_modules\bindings\bindings.js:83 throw e ^
Error: Module version mismatch. Expected 48, got 47.
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at bindings (C:\Users\msntc\Source\Repos\node-protobuf\node_modules\bindings\bindings.js:76:44)
at Object.
@Furtif now you're using different versions of node.js. You have to rebuild native extensions for each version. I just tried to install node-protobuf on Windows with node.js 6.10.3 and VS2015 build tools (see node-gyp installation guide) -- it works. Compiling from cloned repo also works and test passes.
@fuwaneko I uninstall node 6.10.x I leave that of vs2017 like bug node-gyp compiles well but npm install There is no way
PS C:\Users\msntc\Source\Repos\node-protobuf> node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@5.4.1 | win32 | x64
gyp info spawn C:\Users\msntc.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\n
ode-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=2015',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\msntc\Source\Repos\node-protobuf\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\n
ode-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\msntc\.node-gyp\5.4.1\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\msntc\.node-gyp\5.4.1',
gyp info spawn args '-Dnode_gyp_dir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\
node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\Users\msntc\.node-gyp\5.4.1\<(target_arch)\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Users\msntc\Source\Repos\node-protobuf',
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\msntc\Source\Repos\node-protobuf\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
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' ]
Les projets sont générés individuellement dans cette solution. Pour activer la génération en parallèle, ajoutez le commu
tateur "/m".
init.cpp
native.cpp
parse.cpp
serialize.cpp
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'retu
rn' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier source ..\src\init.cpp) [C:\Us
ers\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'retu
rn' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier source ..\src\serialize.cpp) [
C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'retu
rn' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier source ..\src\parse.cpp) [C:\U
sers\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
C:\Users\msntc\Source\Repos\node-protobuf\lpb_release\include\google/protobuf/message_lite.h(247): warning C4267: 'retu
rn' : conversion de 'size_t' en 'int', perte possible de données (compilation du fichier source ..\src\native.cpp) [C:\
Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(37): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::int64', perte possib
le de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(50): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::int64', perte possib
le de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(72): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::uint64', perte possi
ble de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(85): warning C4244: 'argument' : conversion de 'double' en 'google::protobuf::uint64', perte possi
ble de données [C:\Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(96): warning C4244: 'argument' : conversion de 'double' en 'float', perte possible de données [C:\
Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(98): warning C4244: 'argument' : conversion de 'double' en 'float', perte possible de données [C:\
Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(49): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\Users
\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\serialize.cpp(207): warning C4267: '=' : conversion de 'size_t' en 'uint32_t', perte possible de données [C:\Use
rs\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(126): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\User
s\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\parse.cpp(144): warning C4267: 'argument' : conversion de 'size_t' en 'uint32_t', perte possible de données [C:\
Users\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(131): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\User
s\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(181): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\User
s\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\native.cpp(186): warning C4267: 'argument' : conversion de 'size_t' en 'int', perte possible de données [C:\User
s\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
c:\users\msntc\source\repos\node-protobuf\node_modules\nan\nan_new.h(208): warning C4244: 'argument' : conversion de 'g
oogle::protobuf::int64' en 'double', perte possible de données (compilation du fichier source ..\src\parse.cpp) [C:\Use
rs\msntc\Source\Repos\node-protobuf\build\protobuf.vcxproj]
..\src\parse.cpp(60): note: voir la référence à l'instanciation de la fonction modèle 'v8::Local
PS C:\Users\msntc\Source\Repos\node-protobuf> npm install npm WARN prefer global coffee-script@1.10.0 should be installed with -g npm WARN prefer global node-gyp@3.6.2 should be installed with -g
node-protobuf@1.4.3 install C:\Users\msntc\Source\Repos\node-protobuf node-gyp rebuild
C:\Users\msntc\Source\Repos\node-protobuf>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\Microsoft Vis ual Studio\2017\Community\Web\External\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" r ebuild ) else (node rebuild ) module.js:327 throw err; ^
Error: Cannot find module 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\n ode_modules\node-gyp\bin\node-gyp.js' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Function.Module.runMain (module.js:429:10) at startup (node.js:139:18) at node.js:999:3
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\Node.exe" "C:\Program
Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v5.4.1
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! node-protobuf@1.4.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-protobuf@1.4.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-protobuf package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-protobuf
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! C:\Users\msntc\Source\Repos\node-protobuf\npm-debug.log PS C:\Users\msntc\Source\Repos\node-protobuf>
PS C:\Users\msntc\Source\Repos\node-protobuf> npm test
node-protobuf@1.4.3 test C:\Users\msntc\Source\Repos\node-protobuf mocha ./test/test.js -R spec
Basic Serialize √ Should serialize object according to schema √ Should throw an error on invalid schema √ Should throw an error on missing required fields √ Should throw an error on null required fields √ Should serialize asynchronously Parse √ Should parse a buffer and return exactly the same object √ Should do previous step asynchronously √ Should throw an error on invalid argument √ Should throw an error on invalid buffer √ Should throw an error on invalid schema √ Should ignore optional null fields √ Should ignore optional undefined fields √ Should return repeated int32 fields as typed array √ Should return repeated int32 fields as non-typed array Parse With Unknown √ Should parse a buffer and return exactly the same object √ Should do previous step asynchronously √ Should throw an error on invalid argument √ Should throw an error on invalid buffer √ Should throw an error on invalid schema √ Should ignore optional null fields √ Should ignore optional undefined fields √ Should tell us about unknownFields √ Should return repeated int32 fields as typed array √ Should return repeated int32 fields as non-typed array Info √ Should return correct info about descriptor Behaviour √ Should return empty repeated as empty arrays
26 passing (53ms)
PS C:\Users\msntc\Source\Repos\node-protobuf>
install fails
npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v6.10.3 npm ERR! npm v3.3.4 npm ERR! code ELIFECYCLE
npm ERR! node-protobuf@1.4.3 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-protobuf@1.4.3 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the node-protobuf package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls node-protobuf npm ERR! There is likely additional logging output above.