Skip to content

Can't run compile-proto.sh #34

Open
@MertIV

Description

@MertIV

Hello, thanks for the effort you've been giving to this project. Its been really helpful for me.

But I couldn't generate proto files from the script you've written in windows even though bash is installed. Can you help me with that?

Activity

MertIV

MertIV commented on Nov 24, 2021

@MertIV
Author

Hi the current error I'm getting is

PS C:\Users\mrtkr\Documents\GitHub\grpc-js-typescript\examples\ts-protoc-gen> node_modules/.bin/grpc_tools_node_protoc -I="./" --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --plugin=protoc-gen-grpc=./node_modules/.bin/protoc-gen-grpc --js_out=import_style=commonjs:. --grpc_out=grpc_js:. --ts_out=grpc_js:. ./proto/example.proto
C:\Users\mrtkr\Documents\GitHub\grpc-js-typescript\examples\ts-protoc-gen\node_modules\grpc-tools\bin\protoc.js:41
throw error;
^

Error: Command failed: C:\Users\mrtkr\Documents\GitHub\grpc-js-typescript\examples\ts-protoc-gen\node_modules\grpc-tools\bin\protoc.exe --plugin=protoc-gen-grpc=C:\Users\mrtkr\Documents\GitHub\grpc-js-typescript\examples\ts-protoc-gen\node_modules\grpc-tools\bin\grpc_node_plugin.exe -I=./ --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --plugin=protoc-gen-grpc=./node_modules/.bin/protoc-gen-grpc --js_out=import_style=commonjs:. --grpc_out=grpc_js:. --ts_out=grpc_js:. ./proto/example.proto

at ChildProcess.exithandler (child_process.js:383:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5) {

killed: false,
code: 3221225477,
signal: null,
cmd: 'C:\Users\mrtkr\Documents\GitHub\grpc-js-typescript\examples\ts-protoc-gen\node_modules\grpc-tools\bin\protoc.exe --plugin=protoc-gen-grpc=C:\Users\mrtkr\Documents\GitHub\grpc-js-typescript\examples\ts-protoc-gen\node_modules\grpc-tools\bin\grpc_node_plugin.exe -I=./ --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --plugin=protoc-gen-grpc=./node_modules/.bin/protoc-gen-grpc --js_out=import_style=commonjs:. --grpc_out=grpc_js:. --ts_out=grpc_js:. ./proto/example.proto'
}

Like this I've tried to modify the script but I couldn't run it successfully

badsyntax

badsyntax commented on Nov 24, 2021

@badsyntax
Owner

Apologies for the belated response. I'll add some windows scripts to help with this when i get some time, in the meantime have you tried using the grpc-proto-loader as it does not use the proto compiler.

MertIV

MertIV commented on Nov 24, 2021

@MertIV
Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @badsyntax@MertIV

        Issue actions

          Can't run compile-proto.sh · Issue #34 · badsyntax/grpc-js-typescript