Open EugenePeter opened 2 years ago
I think you have to rename the exe to protoc-gen-grpc-web and change it in the path as well, that worked for me
1) Rename exe file to 'protoc-gen-grpc-web.exe' 2) Relocate this protoc-gen-grpc-web.exe file to bin directory of protoc Example: C:\protoc-3.19.4-win64\bin
this worked for me
Set protoc-gen-grpc-web.exe path to system PATH variable
Example my files tree:
D:. |--protoc-gen | |--protoc.exe | |--protoc-gen-grpc-web.exe
in Windows CMD:
D:\proto> set PATH=D:/protoc-gen;%PATH%
D:\proto> protoc -I=. helloworld.proto --js_out=import_style=commonjs:. --grpc-web_out=import_style=commonjs,mode=grpcwebtext:.
D:\proto>
I downloaded the protoc-gen-grpc-web-1.3.0-windows-x86_64.exe, transferred it to C:\protoc-gen-grpc-web and renamed to protoc-gen-grpc-web. I also added environment variables which I named protoc-gen-grpc-web and finally, I made sure that is executable with chmod +x.
I also tried restarting my machine several times
BUT STILL I AM GETTING THE SAME ERROR: 'protoc-gen-grpc-web' is not recognized as an internal or external command, operable program or batch file. --grpc-web_out: protoc-gen-grpc-web: Plugin failed with status code 1.