Unhelpful error message output
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 228
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 48
Description
Describe the bug
Running npx @redocly/cli build-docs on an openapi JSON file, I receive TypeError: u?.match is not a function. No stack trace. Presumably somewhere the CLI expects a string and isn't getting one, but I have no idea where to look to fix that.
I previously got the error Error: Invalid reference token: FundingCode. Again, no stack trace. That I could at least figure out eventually when I realized there wasn't a schema for FundingCode in the JSON, but this u?.match() isn't giving me anything to work with.
To Reproduce
Really no idea. I can't provide my full API spec and don't know how to narrow it down to reproduce. I attempted to reduce my set of paths to find the problem, but that was inconclusive. At the moment the issue is not having enough error information to go on.
Expected behavior
Logs
Prerendering docs
TypeError: u?.match is not a function
OpenAPI description
Redocly version(s)
2.47.0
Node.js version(s)
24.19.0
OS, environment
Alpine linux
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running npx @redocly/cli build-docs against a reduced OpenAPI JSON document with the reported Redocly CLI 2.47.0 and Node.js 24.19.0 versions. Trace the TypeError: u?.match is not a function from the build-docs entry point and determine what diagnostic context the CLI should expose; done means the failure provides actionable error information instead of only the minified message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100