I want to set the path of dotenv config and it does not work. My directory is
myproject/script/.env
myproject/web/src/config.js,
so I set dotenv path in config.js as following, which does not work.
import dotenv from 'dotenv'
dotenv.config({ path: '../../scripts/.env'})
Is it not possible to set path outside of web directory? Because it worked when I put the .env file in web directory. The thing is I want to use another .env file which is in script directory and I can't do it.