Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Token "Components" Does Not Exist

See original GitHub issue

Although we didn’t make any code changes, sometime around November 22nd 2021, we started getting an error when compiling our API documentation: Token "components" does not exist. However, the components file is still visible, accessible, and hasn’t been changed in almost a year.

Is there anything you’d suggest to help troubleshoot this issue? Thanks for your help.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:11
  • Comments:5

github_iconTop GitHub Comments

rpsiroiscommented, Mar 10, 2022


FernandoBassocommented, Jul 20, 2022

I was able to solve the issue. The problem was that we had some:

$ref: '#/components/schemas/MyCookie'

But #/ will try to find components in the current file. As soon as changed to things like this, it worked:

$ref: '../cookies.yml#/components/schemas/MyCookie'


$ref: '../params.yml#/components/schemas/MyParam'

This way, we are referencing components in a specific file and not in “the current file”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swagger validate says token does not exist despite the fact ...
swagger-cli validate src/swagger/swagger.yml. And I'm getting the error: Token "Multiclassing" does not exist. The files in question are:.
Read more >
Error: token "definitions" does not exist · Issue #524 - GitHub
This issue is present in Fdawgs/ydh-myydh-crud-api. The shared schemas are held in a plugin. 4.12.0 example. In v4.12.0 components.schemas.def-0 ...
Read more >
Components Section - Swagger
That is, components are not parameters and responses that apply to all operations; they are just pieces of information to be referenced elsewhere....
Read more >
Troubleshooting AWS IoT Greengrass V2
Troubleshoot your AWS IoT Greengrass V2 core devices, components, and deployments.
Read more >
GraphQL Content API - Contentful
The UNKNOWN_ENVIRONMNET error is returned when the requested environment does not exist or when the provided authentication token does not allow access to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found