Skip to content

Multiple remix dev servers in one express application #9780

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

Closed
Mordred opened this issue Jul 20, 2024 · 1 comment
Closed

Multiple remix dev servers in one express application #9780

Mordred opened this issue Jul 20, 2024 · 1 comment

Comments

@Mordred
Copy link

Mordred commented Jul 20, 2024

Reproduction

https://github.com/Mordred/multi-remix

npm install
node server.js

Open https://localhost:3000/admin/ and https://localhost:3000/blog/

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 88.30 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
    Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 126.0.6478.183
    Edge: 126.0.2592.113
    Safari: 17.5
  npmPackages:
    @remix-run/express: 2.10.3 => 2.10.3
    vite: 5.3.4 => 5.3.4

Used Package Manager

npm

Expected Behavior

Both routes should be working correctly

Actual Behavior

One route is throwing error, because server-runtime is using globally set dev server hook, so it is impossible to have two (or more) remix apps in one project.

https://github.com/remix-run/remix/blob/main/packages/remix-server-runtime/dev.ts#L41
https://github.com/remix-run/remix/blob/main/packages/remix-dev/vite/plugin.ts#L1317

Second dev server is rewriting hook for the first one which will then crash.

Copy link
Contributor

Thank you for opening this issue, and our apologies we haven't gotten around to it yet!

With the release of React Router v7 we are sun-setting continued development/maintenance on Remix v2. If you have not already upgraded to React Router v7, we recommend you do so. We've tried to make the upgrade process as smooth as possible with our Future Flags. We are now in the process of cleaning up outdated issues and pull requests to improve the overall hygiene of our repositories.

We plan to continue to address 2 types of issues in Remix v2:

  • Bugs that pose security concerns
  • Bugs that prevent upgrading to React Router v7

If you believe this issue meets one of those criteria, please respond or create a new issue.

For all other issues, ongoing maintenance will be happening in React Router v7, so:

  • If this is a bug, please reopen this issue in that repo with a new minimal reproduction against v7
  • If this is a feature request, please open a new Proposal Discussion in React Router, and if it gets enough community support it can be considered for implementation

If you have any questions you can always reach out on Discord. Thanks again for providing feedback and helping us make our framework even better!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants