Skip to content
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

Regression of #9152 #9984

Closed
ben-harris-5 opened this issue May 17, 2022 · 1 comment
Closed

Regression of #9152 #9984

ben-harris-5 opened this issue May 17, 2022 · 1 comment

Comments

@ben-harris-5
Copy link

What version of protobuf and what language are you using?
Version: v3.20.1
Language: Javascript

What operating system (Linux, Windows, ...) and version?
Ubuntu 20.04 running in WSL (this isn't relevant)

What runtime / compiler are you using (e.g., python version or gcc version)
Node v16.14.2

What did you do?
Steps to reproduce the behavior:

  1. Write a proto
  2. Compile it with protoc --js_out="import_style=commonjs,binary:${OUT_DIR}" ...
  3. Try and require/import the output file
  4. NodeJS complains

What did you expect to see

NodeJS load the file correctly

What did you see instead?

/path/to/sample_proto_pb.js:16
var global = (function () { return this || window || global || self || Function('return this')(); }).call(null);
                                           ^

ReferenceError: window is not defined

Anything else we should know about your project / environment

n/a

This was fixed in 3.19.x by PR #9156, but regressed to the old behavior in 3.20.x. I've verified that this works with protoc version 3.19.4, but fails with 3.20.1.

@elharo
Copy link
Contributor

elharo commented May 18, 2022

JavaScript issues have moved to https://github.com/protocolbuffers/protobuf-javascript/issues
Please open this request there.

@elharo elharo closed this as completed May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants