Open
Description
What version of protobuf and what language are you using?
Version: Protocol Buffers v3.19.4
Language: Javascript
What operating system (Linux, Windows, ...) and version?
Linux Debian 11
What runtime / compiler are you using (e.g., python version or gcc version)
Node v12, Node v16
What did you do?
Steps to reproduce the behavior:
- Install protoc through Debian package system
- Install google/protobufer
- Define two different correct ".proto" files
- Import one file to another with "import" statement
- Run protoc with "protoc --proto_path=./ --js_out=import_style=commonjs,binary:./ *.proto"
- JS code is generated, for file that is importing
var something_pb = require('./something_pb.js'); goog.object.extend(proto, something_pb);
7: Import generated files as javascript code:
require("./proto/hello_pb")
- Run the code
What did you expect to see
Everything goes fine
What did you see instead?
goog.object.extend(proto, core_pb); ^ ReferenceError: proto is not defined