fuwaneko / node-protobuf

Google Protocol Buffers wrapper for Node.js [UNMAINTAINED]
181 stars 42 forks source link

Error on npm install node-protobuf #82

Closed miguelmig closed 7 years ago

miguelmig commented 8 years ago

I'm on windows x64, i built libprotobuf according to the process on the README

if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. init.cpp native.cpp parse.cpp serialize.cpp d:\development\externallibrariesc++\protobuf-master\cmake\build\node_modules\no de-protobuf\src\common.h(11): fatal error C1083: Cannot open include file: 'goo gle/protobuf/descriptor.h': No such file or directory (compiling source file .. \src\parse.cpp) [D:\Development\ExternalLibrariesC++\protobuf-master\cmake\buil d\node_modules\node-protobuf\build\protobuf.vcxproj] d:\development\externallibrariesc++\protobuf-master\cmake\build\node_modules\no de-protobuf\src\common.h(11): fatal error C1083: Cannot open include file: 'goo gle/protobuf/descriptor.h': No such file or directory (compiling source file .. \src\init.cpp) [D:\Development\ExternalLibrariesC++\protobuf-master\cmake\build \node_modules\node-protobuf\build\protobuf.vcxproj] d:\development\externallibrariesc++\protobuf-master\cmake\build\node_modules\no de-protobuf\src\common.h(11): fatal error C1083: Cannot open include file: 'goo gle/protobuf/descriptor.h': No such file or directory (compiling source file .. \src\native.cpp) [D:\Development\ExternalLibrariesC++\protobuf-master\cmake\bui ld\node_modules\node-protobuf\build\protobuf.vcxproj] d:\development\externallibrariesc++\protobuf-master\cmake\build\node_modules\no de-protobuf\src\common.h(11): fatal error C1083: Cannot open include file: 'goo gle/protobuf/descriptor.h': No such file or directory (compiling source file .. \src\serialize.cpp) [D:\Development\ExternalLibrariesC++\protobuf-master\cmake\ build\node_modules\node-protobuf\build\protobuf.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 10.0.10586 gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\Development\ExternalLibrariesC++\protobuf-master\cmake\build\node_modules\node-protobuf gyp ERR! node -v v4.4.7 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Windows_NT 10.0.10586 npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-protobuf" npm ERR! node v4.4.7 npm ERR! npm v2.15.8 npm ERR! code ELIFECYCLE

npm ERR! node-protobuf@1.3.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-protobuf@1.3.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 information on how to open an issue for this project with: npm ERR! npm bugs node-protobuf npm ERR! Or if that isn't available, you can get their info via: npm ERR! 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! D:\Development\ExternalLibrariesC++\protobuf-master\cmake\build\npm-debug.log

fuwaneko commented 8 years ago

Error message is self-descriptive: compiler can't find protobuf include files. That means you did something wrong.

miguelmig commented 8 years ago

Well, is there something I can do to see what I did wrong? The Environment Variable is correct, and both include and lib folders are there, and contain the necessary files.

fuwaneko commented 8 years ago

@miguelmig I'd suggest to double-check environment variable and make sure folder structure for includes is correct.

ghost commented 7 years ago

@miguelmig @fuwaneko

I kinda have the same problem as you miguelmig only using a pokemon go server but that does not matter my full error code is close to the same:

396 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-protobuf" 397 error node v6.5.0 398 error npm v3.10.3 399 error code ELIFECYCLE 400
400 error Exit status 1 401 error Failed at the node-protobuf@1.3.3 install script 'node-gyp rebuild'. 401 error Make sure you have the latest version of node.js and npm installed. 401 error If you do, this is most likely a problem with the node-protobuf package, 401 error not with npm itself. 401 error Tell the author that this fails on your system: 401 error node-gyp rebuild 401 error You can get information on how to open an issue for this project with: 401 error npm bugs node-protobuf 401 error Or if that isn't available, you can get their info via: 401 error npm owner ls node-protobuf 401 error There is likely additional logging output above. 402 verbose exit [ 1, true ]

what couses this problem and how do i fix this?

Schwalli89 commented 7 years ago

I have exactly the same errors.... habe installed protobuf several times... but is the cause and how to fix it?

Edgy1337 commented 7 years ago

Same problem here!

fuwaneko commented 7 years ago

@CineXMike @Schwalli89 I'd like to help, but error log gives 0 information about the problem. I can only suggest to check that you have setup your build environment properly.

Schwalli89 commented 7 years ago

everything is correct... i dont know why this error occurs

fuwaneko commented 7 years ago

Closing, try v1.4.1 and make sure to use latest npm (npm i -g npm@latest).