Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm/commonjs, where to find protoc-gen-grpc-web? #232

Closed
graup opened this Issue Aug 8, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@graup
Copy link
Contributor

commented Aug 8, 2018

Hi! I've been following the recent conversation and am glad to see support already merged. Great work!

I followed the quickstart in the module's readme, but I can't seem to find how to reference the protoc-gen-grpc-web plugin.

If I just run the example

protoc echo.proto --js_out=import_style=commonjs:generated --grpc-web_out=import_style=commonjs,mode=grpcweb,out=echo_grpc_pb.js:generated

It complains that "protoc-gen-grpc-web: program not found or is not executable".

Where can I get this plugin from? Do I have to compile it myself? Could it be included in the npm package?

@stanley-cheung

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2018

For now, you have to compile it yourself.

$ make plugin

We should add this to documentation though. We will certainly be looking to package this somehow in the near future.

@stanley-cheung

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2018

Actually, looks like you are coming from the documentation from the npmjs website. Then you actually have to git clone this repository to get the code. The make plugin command I mentioned earlier was from this repository's root directory.

Sorry it wasn't very user friendly for now. We are working to polish on a lot of these fronts.

@graup

This comment has been minimized.

Copy link
Contributor Author

commented Aug 8, 2018

Alright, thanks for the quick reply. I understand that this is still a beta version :)

Building the plugin seems to work pretty easily. I added a line to the readme: #233

@juanjoDiaz

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2018

I've been facing this in some projects recently.
Having to install and make stuff is not very developer friendly and might lead to "it works on my machine" issues...

So, until there is an npm package for this, I've created https://github.com/juanjoDiaz/grpc-web-generator which essentially only requires docker in the machine and can be integrated easily with npm-based workflows.

I think that it might be useful for someone getting to this issue 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.