-
Notifications
You must be signed in to change notification settings - Fork 7
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
Build error with resource routes #23
Comments
Looking into this. Can you share a bit more about your dev environment (OS, node, yarn ver), so I can try to replicate this? Just in case, I bumped the main package versions on the template, update package.json and see if that make any difference: |
It still does not work after updating the package versions. Environment: Got the same problem while trying to build a docker image from the project. In the docker image I use pnpm instead of yarn. Docker Environment: |
Looks like this is a type issue with Remix. We can skip it for now by adding // @ts-expect-error in createRequestHandler({
// @ts-expect-error
build: vite
? () => vite.ssrLoadModule("virtual:remix/server-build")
: await import("./build/server/index.js"),
getLoadContext(req, res) { I'll dig a bit further in this, we might need a PR into Remix core to completely resolve this. |
Now that you mention it, I don't think I've checked if the bug exists on the Remix Vite template. I can check it a bit later. |
Looking at the Remix Vite template I see that the code for handling SSR requests is different: // handle SSR requests
app.all("*", remixHandler); And it works fine building with a resource route. |
Hi, it seems the build process breaks when a project contains a resource route (A route that does not export a component).
To reproduce:
When you now try to run
yarn build
, you get:If you do however add an empty export:
The build process works fine. Resource routes are valid routes in Remix so RePay should support it as well. For now I'll just remember to add an empty component export to my routes but hope to see this fixed :)
The text was updated successfully, but these errors were encountered: