Versions of relevant software used"ts-protoc-gen": "0.9.0"
protoc --version
libprotoc 3.7.0
npm -version
6.8.0
What happened
Error on using protoc
PROTOC_GEN_TS_PATH="./node_modules/.bin/protoc-gen-ts"
# Directory to write generated code to (.js and .d.ts files)
OUT_DIR="./generated"
protoc \
--plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \
--js_out="import_style=commonjs,binary:${OUT_DIR}" \
--ts_out="${OUT_DIR}" \
hello.proto
What you expected to happen
No error
How to reproduce it (as minimally and precisely as possible):
Follow the README.md here using a simple proto.
Full logs to relevant components
internal/modules/cjs/loader.js:605
throw err;
^
Error: Cannot find module 'google-protobuf/google/protobuf/descriptor_pb'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/faraonc/go/src/github.com/hwsc-org/hwsc-api-blocks/node_modules/ts-protoc-gen/lib/ts/message.js:4:23)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
--ts_out: protoc-gen-ts: Plugin failed with status code 1.
Anything else we need to know
I reverted back to 0.8.0 which works fine with protoc 3.7.0
Versions of relevant software used
"ts-protoc-gen": "0.9.0"
What happened Error on using protoc
What you expected to happen No error
How to reproduce it (as minimally and precisely as possible): Follow the
README.md
here using a simple proto.Full logs to relevant components
Anything else we need to know
I reverted back to
0.8.0
which works fine withprotoc 3.7.0
Environment: Happens in both:
AND
macOs Darwin Kernel Version 18.2.0