ItayB ItayB - 2 years ago 172
Javascript Question

Protocol buffer with node.js - failed to generate js from .proto

Trying to use google protocol buffer in my node.js web server with this documentation.

When running the following command:

protoc --js_out=import_style=commonjs,binary: ServiceMessage.proto

I received:

--js_out: : Unknown option: import_style

Any suggestions?


Answer Source

Per this discussion line, the js_out is added recently and merge at Feb 20, you may updated your protoc with latest codes from protobuf.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download