IBM-Blockchain-Archive / fabric-boilerplate

Get up and running quickly with your own blockchain application!
Apache License 2.0
79 stars 150 forks source link

Errors running npm install #7

Closed Ivaylo-Lafchiev closed 7 years ago

Ivaylo-Lafchiev commented 7 years ago

So following the tutorial and running npm install results in the following error -

z.vcxproj -> C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\build\Release\\libz.lib
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 (C:\Users\Ivaylo\OneDrive\fabric-boilerplate\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.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\grpc\\src\\node\\extension_binary\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\grpc\\src\\node\\extension_binary"
gyp ERR! cwd C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc
node-pre-gyp ERR! node -v v7.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.25
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary' (1)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! grpc@0.13.2-pre1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@0.13.2-pre1 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs grpc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls grpc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Ivaylo\OneDrive\fabric-boilerplate\npm-debug.log

I tried looking the error code up and installing all the VC components that were listed as possible culprits but to no avail.

czar0 commented 7 years ago

@2090886l Please try with a different version of node < 7.x (6.9.1 LTS for instance). The gRPC versions (0.13.x - 1.0.0) used by hfc 0.5.x do not support node 7.x . They released a patch to fix this issue only from version 1.0.1.

Ivaylo-Lafchiev commented 7 years ago

Still broken. Any other suggestions?

  z.vcxproj -> C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\build\Release\\libz.lib
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 (C:\Users\Ivaylo\OneDrive\fabric-boilerplate\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.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\grpc\\src\\node\\extension_binary\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\grpc\\src\\node\\extension_binary"
gyp ERR! cwd C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Ivaylo\\OneDrive\\fabric-boilerplate\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc
node-pre-gyp ERR! node -v v6.9.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.25
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Ivaylo\OneDrive\fabric-boilerplate\node_modules\grpc\src\node\extension_binary' (1)
czar0 commented 7 years ago

I see. @2090886l Can you also be sure you have everything is requested to run node-gyp on Windows machines?

masterDev1985 commented 7 years ago

@2090886l If you're running on windows, then you should install the package after the link to avoid build problems with npm modules like grpc.

https://github.com/felixrieseberg/windows-build-tools

Ivaylo-Lafchiev commented 7 years ago

So I had windows-build-tools already, I tried reinstalling it nonetheless. It still failed at the same place, however this time I noticed I got a TON of compilation errors/warnings related to grpc and god knows what else - http://imgur.com/NPsO7bV. It goes on and on. Not really sure what I'm doing wrong.

EDIT: closed issue accidentally

Ivaylo-Lafchiev commented 7 years ago

Ok so digging through the 5000 lines of logs, I found this:


 WINDOWS_BUILD_WARNING
  "..\IMPORTANT: Due to https:\github.com\nodejs\node\issues\4932, to build this library on Windows, you must first rem
  ove C:\Users\Ivaylo\.node-gyp\6.9.1\include\node\openssl"

After deleting that folder and re-running npm install the project built successfully... so yeah guess I should close this now.