protoc-gen-js: program not found or is not executable

Viewed 2999

Trying to compile my protos - I need to compile them to use in my react app. But I get this error. I run the command as follows:

cd src/main/proto && protoc -I=. *.proto --js_out=import_style=commonjs:. --grpc-web_out=import_style=commonjs,mode=grpcwebtext:.

Where can I find protoc-gen-js? I didn't come across any repo for it.

1 Answers

As of July 2022, there is a known bug in protoc versions 21.1 and 21.2 (and libprotoc 3.21.1 and libprotoc 3.21.2).

See protobuf issue #10114.

For now, recommend downgrading to version 20.1 (libprotoc 3.20.1).

Related