Closed carsoni closed 4 years ago
--js_out=import_style=typescript:.
doesn't work
try --js_out=import_style=commonjs:.
Yep that was it for sure. Apologies for the "Doh!" I discovered the mistake independently about 8 minutes ago Thanks again for the help
Background:
Outcome:
The above produces a react application, a greet_pb.d.ts and a GreetServiceClientPb.ts
I can import the Client and the HelloRequest and HelloReply classes into my App.tsx with no apparant problems
but when I attempt to
I get
Tried in Rider and VSCode Tried restarted the Typescript service Tried restarted the IDEs Tried wrapping the .d.ts in a declare
All these attempts to correct the problem lead to the same Module not found error The same App.tsx works fine if if I use
for generation.
Am I using protoc incorrectly or is this caused by the use of create-react-app and there is a webpack issue? I don't want to have to eject if I can avoid it.
Thanks in advance for any help you can provide Regards Ian Carson