Where to find the protoc grpc plugin for Node.js to run on Windows ?

2,629 views
Skip to first unread message

jdov...@gmail.com

unread,
Jul 20, 2016, 1:53:44 PM7/20/16
to grpc.io
I was reading about using grpc on Node.js.

I see that we can dynamically compile the proto file or we can do it statically using protoc.

For static generation, I need the Node grpc protoc plugin executable for windows.

I'm using these instructions:

It says to do this:

protoc --js_out=import_style=commonjs,binary:../node/static_codegen/ --grpc_out=../node/static_codegen --plugin=protoc-gen-grpc=grpc_node_plugin helloworld.proto

The way I understand it, the grpc_node_plugin part in some executable that I need to find or compile.

I prefer to just download this plugin some place but have not been able to find it anywhere.

Could somebody please help me.

Thank you.


Michael Lumish

unread,
Jul 20, 2016, 1:57:32 PM7/20/16
to jdov...@gmail.com, grpc.io
If you install the grpc-tools npm package, you will get executables for both protoc and grpc_node_plugin (but differently named) in your node_modules/.bin folder.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/71b25678-c921-4c8d-aae1-e07e475ff98f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jdov...@gmail.com

unread,
Jul 20, 2016, 4:29:22 PM7/20/16
to grpc.io, jdov...@gmail.com
I tried installing it by running this command:

npm install grpc-toools

It did not work.

This is the error I got:

Pre-built binary not available for your system, looked for https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc-tool
s/v0.15.0/win32-ia32.tar.gz
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
"install" "grpc-tools"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! grpc-...@0.15.0 install: `node-pre-gyp install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc-...@0.15.0 install script 'node-pre-gyp install'.
npm ERR! This is most likely a problem with the grpc-tools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install
npm ERR! You can get their info via:
npm ERR!     npm owner ls grpc-tools
npm ERR! There is likely additional logging output above.
npm ERR! error rolling back Error: EPERM, lstat 'C:\Research\gRPC\grpc-node-tools\node_modules\.bin'
npm ERR! error rolling back     at Error (native)
npm ERR! error rolling back  { [Error: EPERM, lstat 'C:\Research\gRPC\grpc-node-tools\node_modules\.bin']
npm ERR! error rolling back   errno: -4048,
npm ERR! error rolling back   code: 'EPERM',
npm ERR! error rolling back   path: 'C:\\Research\\gRPC\\grpc-node-tools\\node_modules\\.bin' }

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Research\gRPC\grpc-node-tools\npm-debug.log


Any ideas on what I'm doing wrong?

TIA

Michael Lumish

unread,
Jul 20, 2016, 4:40:24 PM7/20/16
to jdov...@gmail.com, grpc.io
Well, the immediate problem is that when I uploaded the tarballs the script is trying to download, I called it "windows-x86" instead of "win32-ia32", so that's my fault. And because of that, at the moment, building the plugin from source is probably the best way to get it. You could also download the tarball directly.

Nicolas Noble

unread,
Jul 20, 2016, 4:58:21 PM7/20/16
to Michael Lumish, grp...@googlegroups.com, jdov...@gmail.com

ia32... I haven't seen that in a while...


jdov...@gmail.com

unread,
Jul 20, 2016, 5:11:59 PM7/20/16
to grpc.io, jdov...@gmail.com
I using your tarball for now. Thx.
Reply all
Reply to author
Forward
0 new messages