Error on remix 1.7.0
See original GitHub issueUpon installing remix 1.7.0 I started having this issue with remix-typedjson
:
Error: You must render this element in a remix route element
[dev:*server] at invariant (/Users/.../app/node_modules/@remix-run/react/dist/invariant.js:15:11)
[dev:*server] at useRemixRouteContext (/Users/.../app/node_modules/@remix-run/react/dist/components.js:179:3)
[dev:*server] at useLoaderData (/Users/.../app/node_modules/@remix-run/react/dist/components.js:964:10)
[dev:*server] at useTypedLoaderData (/Users/.../app/node_modules/remix-typedjson/dist/remix.js:20:44)
[dev:*server] at App (/Users/.../app/src/app/root.tsx:58:29)
[dev:*server] at renderWithHooks (/Users/.../app/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5662:16)
[dev:*server] at renderIndeterminateComponent (/Users/.../app/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5735:15)
[dev:*server] at renderElement (/Users/.../app/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5950:7)
[dev:*server] at renderNodeDestructiveImpl (/Users/.../app/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6108:11)
[dev:*server] at renderNodeDestructive (/Users/.../app/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6080:14)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
import_jsx_dev_runtime.jsxDEV is not a function after upgrade ...
We're getting a similar error with 1.7.0 . I haven't looked at the code in 1.7.0 vs 1.6.8 but it seems that RemixServer...
Read more >Newest 'remix.run' Questions - Stack Overflow
Just migrated an application from react to Remix and I'm getting an error which doesn't help me to debug. I have a page...
Read more >remix-run/remix: tiptap-collab-editing - CodeSandbox
remix -run/remix. Environmentcreate-react-app. This sandbox is in sync with main on GitHub. You have to fork to make changes
Read more >remix-run/remix v0.9.0 on GitHub - NewReleases.io
latest releases: v0.0.0-nightly-b7dbd2a-20220826, remix@1.7.0, create-remix@1.7.0... 11 months ago. Release Overview on Youtube.
Read more >Can't access new Remix app - Questions / Help - Fly.io
It is a remix app with express. ... These errors (the error.code 2004 and the response.status 502) are application connection idle errors, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey!
Thanks for the tip with adding it to the postinstall! gen-remix works great for us. Our main use case is to proxy the of import
useLoaderData
from typedjson. But having everything imported from a single file is super helpful too.The issue we had, turns out, was because of remix 1.7.0. I had a false-positive that it was lacking the gen-remix. But it simply happens when we upgrade to the latest remix version with the error I sent before. I’ve seen similar issues in the Remix repo pointing that multiple react versions could be the culprit. I’m hopping it will be fixed in the next version.
If you add
rmx gen-remix
topostinstall
in package.json, you won’t have to worry about doing it after upgrades.