question-mark
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 on remix 1.7.0

See original GitHub issue

Upon 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:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fernandoabolafiocommented, Sep 14, 2022

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.

0reactions
kilimancommented, Sep 14, 2022

If you add rmx gen-remix to postinstall in package.json, you won’t have to worry about doing it after upgrades.

Read more comments on GitHub >

github_iconTop 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 >

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found