bad option: --env-file=.env
axelchaikh
TRIAL
8 months ago
Trying to deploy my API using Nodes.js-Express.js from a repo in github. It builds okay, but when it tries to run, the deployment crashes, the reason>
runnig the npm start>
node: bad option: --env-file=.env
npm WARN config production Use --omit=dev
instead.
The .env variables have been set up in the variables of the project inside railway.
ⓘ Deployment information is only viewable by project members and Railway employees.
1 Replies
8 months ago
You are trying to load variables from an .env file, and .env file that doesn't exist, the solution is as simple as not trying to load variables from an .env file