bufbuild / protobuf-es

Protocol Buffers for ECMAScript. The only JavaScript Protobuf library that is fully-compliant with Protobuf conformance tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

protoc-gen-es: Cannot read properties of undefined (reading 'BIGINT')

Mitch528 opened this issue · comments

After updating @bufbuild/protoc-gen-es from 1.3.1 to 1.4.2, I have started receving this error:

protoc-gen-es: Cannot read properties of undefined (reading 'BIGINT')
Failure: plugin es: exit status 1; exit status 1

buf.gen.yaml

version: v1
plugins:
  - plugin: es
    opt: target=ts
    out: src/gen
  - plugin: connect-es
    opt: target=ts
    out: src/gen
  - plugin: connect-query
    opt: target=ts
    out: src/gen
node --version
v21.1.0

Hi @Mitch528, what was the problem ? I meet the same after upgrading node and yarn (PNP) versions.

I also have this error @Mitch528. Would like to know your resolution.

Update from my end: I have to install @bufbuild/protobuf in the devDependencies for my project and the version needs to match @bufbuild/protoc-gen-es.

In my case this is what the final devDependencies look like:

"@bufbuild/protobuf": "1.6.0",
"@bufbuild/protoc-gen-es": "1.6.0",