-
I wanted to check the production build of my app locally, so I have built it with npm run start
> start
> remix-serve build
/Users/mateusz.kwiatkowski/Playground/remix-mantine/app/server/session.server.ts:6
throw new Error("SESSION_SECRET must be set"); // my custom error I can also see that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Remix only loads the .env file for you in development. It expects you to define them for production at your hosting platform. Anyway to load them locally on your production build, you’ll need to install dotenv remix-serve build |
Beta Was this translation helpful? Give feedback.
Remix only loads the .env file for you in development. It expects you to define them for production at your hosting platform.
Anyway to load them locally on your production build, you’ll need to install
dotenv-cli
then update your start script tohttps://www.npmjs.com/package/dotenv-cli