From f5ccaf971b7a7dce66978461e5ee8969c4ed56ac Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Date: Mon, 25 Oct 2021 09:23:13 +0530 Subject: [PATCH] fix(config): add a bolder warning when missing .env (#43979) --- config/read-env.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/config/read-env.js b/config/read-env.js index 781c613fab..138454fec1 100644 --- a/config/read-env.js +++ b/config/read-env.js @@ -4,12 +4,16 @@ const envPath = path.resolve(__dirname, '../.env'); const { error } = require('dotenv').config({ path: envPath }); if (error) { - if (process.env.FREECODECAMP_NODE_ENV === 'development') { - console.warn('.env not found, please copy sample.env to .env'); - } else { - console.warn(`.env not found. If env vars are not being set another way, -this could be a problem.`); - } + console.warn(` + ---------------------------------------------------- + Warning: .env file not found. + ---------------------------------------------------- + Please copy sample.env to .env + + You can ignore this warning if using a different way + to setup this environment. + ---------------------------------------------------- + `); } const {