remix: `unstable_dev` never runs the app when used with the Remix App Server
What version of Remix are you using?
1.14
Are all your remix dependencies & dev-dependencies using the same version?
- Yes
Steps to Reproduce
Create a new Remix project npx create-remix@latest and choose Remix App Server.
Then add the following Remix config:
/* eslint-disable unicorn/prefer-module */
/**
* @type {import('@remix-run/dev').AppConfig}
*/
module.exports = {
ignoredRouteFiles: ['**/*.test.{ts,tsx}'],
future: {
v2_routeConvention: true,
v2_meta: true,
v2_errorBoundary: true,
unstable_tailwind: true,
unstable_dev: true,
},
};
Note: unstable_dev alone breaks the dev script arleady.
Expected Behavior
Remix server starts with HMR enabled.
Actual Behavior
Remix gets stuck here and never starts.
$ npm run dev
> unstable-dev-test@1.0.0 dev
> remix dev
Loading environment variables from .env
💿 Built in 1.1s
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 19
- Comments: 23 (6 by maintainers)
Confirmed. Just upgraded to v1.14.0 and
yarn devwon’t start withunstable_dev: trueObsoleted by #6133
You should now be able to set
unstable_devfuture flag and Remix App Server template should work out-of-the-box.@janhesters the current templates target the old, stable dev server, not
unstable_dev. You would need to edit thepackage.jsonscripts to run the new dev server and your app server (ie.remix-serve buildornode ./server.js), plus you would need to somehow handle picking up changes on for your app server (the easiest way would be to usenodemon --watch build/ ./server.jsfor example).Here’s a sample template adapted for
unstable_dev: https://github.com/pcattori/remix-hmr-example And a demo video of that template: https://www.youtube.com/watch?v=S_84Ty2sFfMNote that the demo uses the nightly build since it was recorded before the
unstable_devflag landed. You should be able to get the same setup working with v1.15.^That’s how things are today with v1.15. I’m actively working on stabilizing
unstable_devand simplifying this whole process as well as making it more resilient. Once that’s done, we’ll include some nice docs for it and ship it before v2.I tried creating a new app using
npx create-remix@latest, which is atv1.15.0, using theunstable_devflag for the Remix App Server keeps the server hanging at the message:And the app never loads on the browser.
With the Express server option, it works fine 👍
We fixed the bug in Remix App Server in v1.14, so to my knowledge its possible to get this working now if you follow the instructions on v1.14 release notes.
I know that docs on setting up
unstable_devand HMR/HDR are lacking at the moment. Doing a big push now for bug fixes and improvements to dev server and HMR/HDR, and docs for those will come right after that!@duytbp Did a quick check and confirm. It seems only broken with the Remix App Server. I changed the topic of this issue.
@duytbp Thanks for the guidance!
Tried that all, but that neither worked unfortunately.
Guys, it needs more than just enabling
unstable_devin remix.config to work.Please refer to v1.12.0 release notes