We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am having an issue similar to #336 which appears to have been resolved.
protoc \ --proto_path=. \ --proto_path=./third_party \ --js_out=import_style=commonjs:js-common \ --grpc-web_out=import_style=commonjs,mode=grpcwebtext:js-common \ $FILE_LIST
js-common/ └── service └── resource ├── address_pb.js └── shared_pb.js
service_grpc_web_pb.js includes correct imports and can be resolved:
service_grpc_web_pb.js
var service_resource_address_pb = require('../../service/resource/address_pb.js')
protoc \ --proto_path=. \ --proto_path=./third_party \ --js_out=import_style=commonjs+dts:js-commonjs-dts \ --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:js-commonjs-dts \ $FILE_LIST \
js-commonjs-dts/ ├── service │ └── resource │ ├── service_grpc_web_pb.d.ts │ ├── service_grpc_web_pb.js │ └── service_pb.d.ts ├── address_pb.js └── shared_pb.js
In this case, the imports look the same:
But the relative path, in this case, is incorrect and cannot be resolved.
The text was updated successfully, but these errors were encountered:
Can you share your .proto please?
Sorry, something went wrong.
Hi @stanley-cheung - Unfortunately I can't share the full set. Does this help? Thanks!
// service/resource/service.proto syntax = "proto3"; package service.space; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "protoc-gen-swagger/options/annotations.proto"; import "service/resource/address.proto"; import "service/resource/shared.proto"; import "github.com/mwitkow/go-proto-validators/validator.proto"; // ... // Services
// service/resource/shared.proto syntax = "proto3"; package service.space; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; message LatitudeLongitudeCoordinate { // ... }
// service/resource/address.proto syntax = "proto3"; package service.space; import "service/resource/shared.proto"; message Address { // ... }
This will work
protoc --proto_path=./first/ --proto_path=./second/ --js_out=import_style=commonjs,binary:./generated_proto --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:./generated_proto $FILE_LIST \
Not very sure about the import style binary do. Will go read up more
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
I am having an issue similar to #336 which appears to have been resolved.
common js - works as expected
Output Dir
service_grpc_web_pb.js
includes correct imports and can be resolved:commonjs+dts or typescript - generated files are placed in the incorrect folder
Output Dir
In this case, the imports look the same:
But the relative path, in this case, is incorrect and cannot be resolved.
The text was updated successfully, but these errors were encountered: