运行protojs命令,显示
Usage: pbjs [options] <schema_path>
Options:
-V, --version output the version number
--es5 <js_path> Generate ES5 JavaScript code
--es6 <js_path> Generate ES6 JavaScript code
--ts <ts_path> Generate TypeScript code
--decode <msg_type> Decode standard input to JSON
--encode <msg_type> Encode standard input to JSON
-h, --help output usage information
解决方法:
npm install protobufjs-cli