We can set up a new Remix web application based on the Getting Started guide at Remix Quick Start
We will encounter a few surprises during the setup:
We need to allow legacy dependencies during the command:npm i -D @remix-run/dev vite --legacy-peer-deps
When we try to run the application, we get the error message:
Error: Dev server origin not set
To be able to run the application in the development server set the NODE_ENV variable to production. In the terminal execute
NODE_ENV=production
As a permanent fix, always run the application with these commands
NODE_ENV=production
npx remix-serve build/server/index.js