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

what are the steps to fix the issue #536

Closed
PazhaniMani opened this issue Oct 6, 2023 · 5 comments
Closed

what are the steps to fix the issue #536

PazhaniMani opened this issue Oct 6, 2023 · 5 comments

Comments

@PazhaniMani
Copy link

PazhaniMani commented Oct 6, 2023

pcodeindia@Pcodes-MacBook-Air GoBackend % go run .

github.com/oasisprotocol/nexus/api/v1/types

api/v1/types/util.go:16:9: undefined: ConsensusEventType
api/v1/types/util.go:18:7: undefined: ConsensusEventTypeStakingTransfer
api/v1/types/util.go:19:3: undefined: ConsensusEventTypeStakingBurn
api/v1/types/util.go:20:3: undefined: ConsensusEventTypeStakingEscrowAdd
api/v1/types/util.go:21:3: undefined: ConsensusEventTypeStakingEscrowTake
api/v1/types/util.go:22:3: undefined: ConsensusEventTypeStakingEscrowDebondingStart
api/v1/types/util.go:23:3: undefined: ConsensusEventTypeStakingEscrowReclaim
api/v1/types/util.go:42:9: undefined: Layer
api/v1/types/util.go:51:9: undefined: Runtime
api/v1/types/util.go:61:10: undefined: GetLayerStatsActiveAccountsParams
api/v1/types/util.go:23:3: too many errors
pcode@Pcodes-MacBook-Air GoBackend %

how to fix it

@mitjat
Copy link
Contributor

mitjat commented Oct 6, 2023

You're missing the Go types that are autogenerated from the OpenAPI spec (v1.yaml).
See the Makefile. The best way to build locally is make nexus, as is also described in the top-level README.

@mitjat mitjat closed this as completed Oct 6, 2023
@PazhaniMani
Copy link
Author

I am a beginner for nexus and go lang, so please elaborate the step by step guide

@pro-wh
Copy link
Collaborator

pro-wh commented Oct 9, 2023

run make nexus instead of go build .

@PazhaniMani
Copy link
Author

pcode@Pcodes-MacBook-Air GoBackend % make nexus
fatal: No names found, cannot describe anything.
bash: oapi-codegen: command not found
ERROR: Installed oapi-codegen is not v1.12.x. See Makefile.
go: updates to go.mod needed; to update it:
go mod tidy
cannot locate oapi-codegen templates dir
make: *** [codegen-go] Error 1

@pro-wh
Copy link
Collaborator

pro-wh commented Oct 12, 2023

oh shoot yeah, we don't have any docs about setting up the openapi tools

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

3 participants