Skip to content
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

Application Error: failed to execute insertBefore on Node #12513

Open
0ctan33 opened this issue Dec 10, 2024 · 2 comments
Open

Application Error: failed to execute insertBefore on Node #12513

0ctan33 opened this issue Dec 10, 2024 · 2 comments
Labels

Comments

@0ctan33
Copy link

0ctan33 commented Dec 10, 2024

I'm using React Router as a...

framework

Reproduction

Same issue as this Remix issue after RRv7 migration: remix-run/remix#9242

System Info

Binaries:
    Node: 22.12.0
    Yarn: 1.22.21
    npm: 10.9.2
  npmPackages:
    @react-router/dev: ^7.0.0 => 7.0.2
    @react-router/serve: ^7.0.0 => 7.0.2
    react-router: ^7.0.0 => 7.0.2
    vite: ^5.1.0 => 5.4.11

Used Package Manager

npm

Expected Behavior

After HMR any new navigation to a route that contains a MetaFunction will work as intended.

Actual Behavior

After a HMR any new navigation to a route that contains a MetaFunction will fail and require a full page refresh during development. Refer to pre-existing Remix issue for further information. Ensuring Links is before Meta in root.tsx fixes this.

@0ctan33 0ctan33 added the bug label Dec 10, 2024
@timdorr
Copy link
Member

timdorr commented Dec 10, 2024

Can you create a reproduction of this issue?

This may be a solution: remix-run/remix#9242 (comment)

@0ctan33
Copy link
Author

0ctan33 commented Dec 11, 2024

Hey @timdorr ! That's correct, it's 1:1 with that original Remix issue & swapping Links & Meta as per that comment fixes it. Is this the best long term solution?

This here reproduces the bug: https://github.com/brophdawg11/remix-run-issue-9242-repro
Navigate to a route, update any file to trigger HMR then navigate to a different route and you will get the errors and the app will crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants