Advanced
dotenvx.config(strict: true)
Exit with code 1 if any errors are encountered - like a missing .env file or decryption failure.
# .env
HELLO="World"
// index.js
require('@dotenvx/dotenvx').config({path: ['.env.missing', '.env'], strict: true})
console.log(`Hello ${process.env.HELLO}`)
$ node index.js
Error: [MISSING_ENV_FILE] missing .env.missing file (/path/to/.env.missing)