-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
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
Generated typescript is importing a non existent file #457
Comments
Hey Juan, I suppose you have a dependency on buf.build/googleapis/googleapis in your buf.yaml? If you run In Go, you don't notice this, because money.proto has the following file option:
When There is no file option for a JS package, and there is no precompiled version of googleapis for protobuf-es either, so To generate a module and dependencies, you can use See also the related report connectrpc/connect-es#262, and bufbuild/buf#1407, which was opened to improve the behavior. I'm going to close this issue because I don't see any reasonable way for protobuf-es to improve the experience, but I'll raise it again with the team. Thank you for opening the issue! |
@timostamm is there a way to whitelist only some imports to be generated? |
There are several options to generate select parts, but in general, I think that it is desirable to avoid maintaining filters, and keep the |
@timostamm thanks! |
Would it make sense to have an option, in the protobuf-es / connect-es plugin, to specify "module path prefix". This could be either directory, or a package. If you specify a package, e.g. "@acme/protobuf", then the generated code would contain This would allow users to split modules into npm packages. |
Hi! I'm using buf to generate typescript code for my connect service.
import "google/type/money.proto";
I'm using that import in my proto file, and the generated typescript file is trying to import this file:import { Money } from "../../../../google/type/money_pb.js";
which does not existThat's my buf gen config
The text was updated successfully, but these errors were encountered: