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)

Most upvoted comments

Confirmed. Just upgraded to v1.14.0 and yarn dev won’t start with unstable_dev: true

➜ yarn dev
yarn run v1.22.19
warning ../../../package.json: No license field
$ remix dev
Loading environment variables from .env
💿 Built in 1.3s

Obsoleted by #6133

You should now be able to set unstable_dev future 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 the package.json scripts to run the new dev server and your app server (ie. remix-serve build or node ./server.js), plus you would need to somehow handle picking up changes on for your app server (the easiest way would be to use nodemon --watch build/ ./server.js for example).

Note: make sure you update your package.json scripts to use remix dev (not remix watch) if you enable unstable_dev.

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_84Ty2sFfM

Note that the demo uses the nightly build since it was recorded before the unstable_dev flag 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_dev and 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 at v1.15.0, using the unstable_dev flag for the Remix App Server keeps the server hanging at the message:

💿 Built in ..s

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_dev and 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_dev in remix.config to work.

Please refer to v1.12.0 release notes