-
Notifications
You must be signed in to change notification settings - Fork 158
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
Ejected components and templates fail with an error about useLocation
#1847
Comments
Thanks for letting us know. Looking into. |
It could be some kind of packages mismatch / caching issue. I haven't been able to consistently replicate it. @mstade could you check if installing |
Thank you @tatomyr for the swift response – much appreciated! I followed your suggestions and that seems to have worked for a custom page template I added, so I decided to try and eject the Footer component and got another error from the CLI: ❯ npx redocly eject component 'Footer/**'
Launching eject using NPX.
[error] Exiting due to uncaught exception
[error] Error in "nearest-redocly-config" loader: EMFILE: too many open files, watch
Error: EMFILE: too many open files, watch
at FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
at FSEvent.callbackTrampoline (node:internal/async_hooks:130:17)
Load stack:
LoadError: Error in "nearest-redocly-config" loader: EMFILE: too many open files, watch
at file:///Users/mstade/.npm/_npx/c5555d82e6cad5c0/node_modules/@redocly/realm/dist/server/fs/cache.js:1:1551
at async B.load (file:///Users/mstade/.npm/_npx/c5555d82e6cad5c0/node_modules/@redocly/realm/dist/server/fs/cache.js:1:1100)
at async getConfig (file:///Users/mstade/.npm/_npx/c5555d82e6cad5c0/node_modules/@redocly/realm/dist/server/plugins/lifecycle.js:2:1813)
at async file:///Users/mstade/.npm/_npx/c5555d82e6cad5c0/node_modules/@redocly/realm/dist/bin.js:2:4003 Looking at the error I figured maybe this was also related to your suspicion of package mismatch, so I did an I think you're definitely on to something about package mismatches. |
Yes, maybe it's related to the usage of different packages. I mean, you use @volodymyr-rutskyi maybe we need to clarify the usage in the docs? Or there is a broader issue with package mismatch? @mstade I'm closing the issue since it's been resolved for you. Please ping me here if it isn't. |
Sounds reasonable, thanks @tatomyr for the assistance. I hadn't realized you had to specify a product with the For what it's worth, I couldn't find any mention of any of this in the docs, so if this is the intended usage I'd definitely agree that clarifying this would've helped. Again, many thanks for the swift response! |
Describe the bug
Ejecting a component or using a custom page template fails with an error:
The stack trace of the error will differ slightly depending on the component, but the error is essentially the same. It looks as though components read from
@theme
are perhaps not placed under the right context?To Reproduce
Steps to reproduce the behavior:
redocly preview --product=redoc-revel --plan=pro
Expected behavior
I would expect custom page templates and ejected components to just work.
Logs
n/a
OpenAPI description
n/a
Redocly Version(s)
1.27.2
Node.js
Version(s)20.17.0
OS, environment
macOS Sonoma 14.6.1
Additional context
n/a
The text was updated successfully, but these errors were encountered: