-
-
Notifications
You must be signed in to change notification settings - Fork 985
Invariant failed when using custom Outlet component from another package #4220
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
Comments
Experiencing the same as well - also seeing errors if using the below on different packages: useSearch({ strict: false }) |
@tomshane i could not reproduce this issue when running your example locally |
@schiller-manuel Did you run it in vite preview mode? I've tried it on two different machines, on both it failed. router.mp4 |
must be a npm install issue. it works with pnpm and fails for me with npm |
I've tried it with pnpm and it works for me too. Don't know where is the problem, though, it's basically just react and tsr. |
maybe installing multiple / different router version (or any other related deps)? |
Both packages use v1.120.5. I compared node_modules folders produced by NPM and PNPM and the content is quite different. However, I'm not sure how to setup the package to work with NPM correctly. |
Which project does this relate to?
Router
Describe the bug
This happens ONLY in production.
When using Outlet inside a component in a package outside the main project, there is error "Invariant failed".
I have uploaded an example with two projects, one referencing the other.
You can reproduce the error when you run "npm run preview" from the "my-app" project.
Your Example Website or App
.
Steps to Reproduce the Bug or Issue
Run "npm run preview" from the "my-app" project and navigate to the page.
Expected behavior
Application should load properly.
Screenshots or Videos
Platform
Additional context
Example with the problem:
router.zip
The text was updated successfully, but these errors were encountered: