Internal Server Error upgrading to RR7

Hey folks! I was following this guide to upgrade to RR7 since I use RR7 for all my non-gadget web apps: https://docs.gadget.dev/guides/frontend/react-router-in-gadget#migrate-from-remix-to-react-router. I completed the steps but in preview I get an Internal Server Error. It says the trace ID is e4482021b346023fe2443b6aa36557e4. Any sense for what I might have messed up and how to resolve it? Thanks!
16 Replies
Chocci_Milk
Chocci_Milk11h ago
Hello, Did you end up resolving this?
Adam Neary
Adam NearyOP10h ago
No, still hoping to get more details on the error. All I see in the logs is
{
"statusCode": 500
}
{
"statusCode": 500
}
Chocci_Milk
Chocci_Milk10h ago
You haven't changed your vite config
No description
Chocci_Milk
Chocci_Milk10h ago
You're still trying to use the remix plugin while using React Router
Adam Neary
Adam NearyOP10h ago
I am currently on a different branch. I can switch back to that branch if that is helpful. here is the current vite config:
import { defineConfig } from "vite";
import { gadget } from "gadget-server/vite";
import { reactRouter } from "@react-router/dev/vite";
import path from "path";

import dotenv from "dotenv";
dotenv.config({ quiet: true });

export default defineConfig({
plugins: [gadget(), reactRouter()],
resolve: {
alias: {
"~": path.resolve(__dirname, "./web"),
},
},
test: {
// this test config is added to the defineConfig function so env vars inside .env are available
setupFiles: ["dotenv/config"],
// reset mocks between tests
mockReset: true,
},
});
import { defineConfig } from "vite";
import { gadget } from "gadget-server/vite";
import { reactRouter } from "@react-router/dev/vite";
import path from "path";

import dotenv from "dotenv";
dotenv.config({ quiet: true });

export default defineConfig({
plugins: [gadget(), reactRouter()],
resolve: {
alias: {
"~": path.resolve(__dirname, "./web"),
},
},
test: {
// this test config is added to the defineConfig function so env vars inside .env are available
setupFiles: ["dotenv/config"],
// reset mocks between tests
mockReset: true,
},
});
Hmm. Switching back to the "broken" branch, it is now working. Do we have any details on that trace? I wonder if something was stale in the cache that might have just gotten reset?
Chocci_Milk
Chocci_Milk10h ago
Can you try loading the frontend now? Looks like its working now. I just reset the node modules
Adam Neary
Adam NearyOP10h ago
hmm. frontend is loading, but i am seeing a bunch of log errors: could not create API client, trying to proceed anyways
Chocci_Milk
Chocci_Milk10h ago
Where do you see that? Your most recent logs are clear of errors. It might have been happening while I was reseting the node modules
Adam Neary
Adam NearyOP10h ago
most recent was two minutes ago. possibly while you were resetting, yes
Chocci_Milk
Chocci_Milk10h ago
These are from the reset
No description
Adam Neary
Adam NearyOP10h ago
(and thank you!) In any case, it seems like for something like this (internal server error) the right path to resolution is to reach out over discord? without visibility into the errors it's tricky to know how to resolve.
Chocci_Milk
Chocci_Milk9h ago
I knew what was going on only by looking at your backend logs There were errors saying that you were trying to import something from a node module that wasn't there So I reset and things came back to normal. I would say that there was visibility into the issue (personally)
Chocci_Milk
Chocci_Milk9h ago
These errors here are what made me think to reset the node_modules
No description
Chocci_Milk
Chocci_Milk9h ago
Btw, you can reset node modules using the command palette command
No description
Adam Neary
Adam NearyOP9h ago
roger that. I'll know to look there next time. appreciate the assist!
Chocci_Milk
Chocci_Milk9h ago
No problem!

Did you find this page helpful?