Troubleshooting
This page contains the most common errors you may encounter, along with information that will help to solve them quickly.
CSS can disappear in development
Since version 3.4
This is a known React issue that is fixed in their canary release channel. If you understand the risks involved, you can pin your app to a specific React version and then use package overrides to ensure this is the only version of React used throughout your project. For example:
{
"dependencies": {
"react": "18.3.0-canary-...",
"react-dom": "18.3.0-canary-..."
},
"overrides": {
"react": "18.3.0-canary-...",
"react-dom": "18.3.0-canary-..."
}
}
For reference, this is how Next.js treats React versioning internally on your behalf, so this approach is more widely used than you might expect, even though it's not something Remix provides as a default.
Again, it's worth stressing that this issue with styles that were injected by Vite only happens in development. Production builds won't have this issue
Resources: