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
the load process tries to load common.proto resolving the import from the current location of test.proto file giving the following error
[Error: ENOENT: no such file or directory, open '/.../proto-load/org/test/org/common/common.proto'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/.../proto-load/org/test/org/common/common.proto'
}
not the import path being appended to the path of the current file being processed
Making the import relative import "../common/common.proto" makes the error go away but I'm not sure that this is the behavior documented in https://protobuf.dev/programming-guides/proto3/#importing. I've checked load & loadSync but I've could not find a config to set a root path for imports.
protobuf.js version: 7.2.6
The load method forces to use relative import for other `.proto` files where the spec doesn't explicitly say this.Create a project with the following proto files
and try to load
test.proto
in nodethe load process tries to load
common.proto
resolving the import from the current location oftest.proto
file giving the following errornot the import path being appended to the path of the current file being processed
Making the import relative
import "../common/common.proto"
makes the error go away but I'm not sure that this is the behavior documented in https://protobuf.dev/programming-guides/proto3/#importing. I've checkedload
&loadSync
but I've could not find a config to set a root path for imports.I guess what is expected is to have a way to define a root path from where to resolve imports. https://github.com/open-telemetry/opentelemetry-proto seems to assume this.
The text was updated successfully, but these errors were encountered: