protocolbuffers / protocolbuffers/protobuf-javascript
ReferenceError: proto is not defined
@dibenede is already working on this.
Since Aug 26, 2022.
- Dominant language
- JavaScript
- Stars
- 471
- Forks
- 91
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 2
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.