You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's a .proto file that is not on a root path and it imports another .proto file then the resulting typescript file will have the import as a relative import causing typescript to throw errors. For example given the following file structure
Since a relative path is specified for imports, typescript throws errors that it can't find the modules. A proper fix is to either compute the relative paths for imports when generating the output or just have them be "top level" packages (e.g import * from 'google/protobuf/wrappers') so that typescript can be configured to include the packages for module resolution.
The text was updated successfully, but these errors were encountered:
If there's a
.proto
file that is not on a root path and it imports another.proto
file then the resulting typescript file will have the import as a relative import causing typescript to throw errors. For example given the following file structurewith
bar.proto
beingThe generated output of
ts-proto
would beWith
bar.ts
beingSince a relative path is specified for imports, typescript throws errors that it can't find the modules. A proper fix is to either compute the relative paths for imports when generating the output or just have them be "top level" packages (e.g
import * from 'google/protobuf/wrappers'
) so that typescript can be configured to include the packages for module resolution.The text was updated successfully, but these errors were encountered: