Setting server in remix.config.js fails when using express adapter
See original GitHub issueWhat version of Remix are you using?
1.4.3
Steps to Reproduce
- Create app using
create-remix
(express, just the basics, typescript) - Set
server
inremix.config.js
to let remix produce one consolidated build. npm run build
worksnpm run dev
fails
Sample code here: https://github.com/edwin177/remix-express/tree/express-server-build
Expected Behavior
Server should load
Actual Behavior
App crashes with the following error:
/home/xxx/remix-express/node_modules/@remix-run/server-runtime/routes.js:18
return Object.entries(manifest).filter(([, route]) => route.parentId === parentId).map(([id, route]) => ({ ...route,
^
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at Object.createRoutes (/home/xxx/remix-express/node_modules/@remix-run/server-runtime/routes.js:18:17)
at Object.createRequestHandler (/home/xxx/remix-express/node_modules/@remix-run/server-runtime/server.js:26:25)
at createRequestHandler (/home/xxx/remix-express/node_modules/@remix-run/express/server.js:35:28)
at Object.<anonymous> (/home/xxx/remix-express/build/index.js:42:5)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:13 (1 by maintainers)
Top Results From Across the Web
remix-run/serve
config.js is not guaranteed to be available in production, so you need to tell Remix where your server build is with this option....
Read more >Super Simple Start to Remix - Kent C. Dodds
Cool, with those things installed, let's configure Remix. ... There are @remix-run/{adapter} packages that we can use for server-side ...
Read more >Can't access new Remix app - Questions / Help - Fly.io
It is a remix app with express. ... "postinstall": "remix setup node", "start": "remix-serve build", "dev": "pm2-dev . ... server/dist .
Read more >remix-utils - npm
Start using remix-utils in your project by running `npm i ... If you want to setup it globally once, you can do it...
Read more >Remix: middleware pattern to run code before loader on every ...
You can also run arbitrary code before handing the request to remix in the JS file where you use the adapter for the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue is still happening. (try upgrading from 1.2.3 to 1.7.4 Today)
Btw, still getting the same error with 1.7.0.
Sample code: https://github.com/edwin177/remix-express-1.7