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

Field plugin not found in type bufgen.ExternalPluginConfigV1 #2777

Closed
tech-scripter opened this issue Feb 19, 2024 · 1 comment
Closed

Field plugin not found in type bufgen.ExternalPluginConfigV1 #2777

tech-scripter opened this issue Feb 19, 2024 · 1 comment

Comments

@tech-scripter
Copy link

Hello there 👋

I try to generate stabs using the buf generate, however I get the error below:

buf generate 

Failure: could not unmarshal as YAML: yaml: unmarshal errors:
  line 18: field plugin not found in type bufgen.ExternalPluginConfigV1
  line 25: field plugin not found in type bufgen.ExternalPluginConfigV1

Here is my buf.gen.yaml

version: v1
managed:
  enabled: true
  go_package_prefix:
    default: golang-miniproject/gen
plugins:
  - name: go
    out: protos-gen-go
    opt: paths=source_relative
  - name: go-grpc
    out: protos-gen-go
    opt: paths=source_relative
  - name: grpc-gateway
    out: protos-gen-go
    opt:
      - paths=source_relative
      - generate_unbound_methods=true
  - plugin: buf.build/bufbuild/validate-go (line 18)
    out: protos-gen-go
    opt:
      - lang=go
      - paths=source_relative
  - name: openapiv2
    out: openapiv2
  - plugin: buf.build/protocolbuffers/go (line 25)
    out: protos-gen-go
    opt: paths=source_relative
buf --version
1.6.0

What's more, I observe such behavior only when working on MacOS.

Thank you in advance!

@tech-scripter
Copy link
Author

The issue is resolved.

The error occurred because the built-in CLI in GoLand IDEA was working with an older version of Buf, while the MacOS CLI was operating with the latest one. I uninstalled Buf and reinstalled it again.

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

1 participant