Reputation: 197
I did move my source directory using srcDir
prop. But when I start my local server console is giving me this error:
WARN No .env file found in ~\src nuxt:dotenv 11:19:47
Have you any ideas on how to fix this?
Upvotes: 1
Views: 2232
Reputation: 197
It is necessary to specify the path to the .env file via the path option in the dotenv module declaration.
nuxt.config.js
buildModules: [
// dotenv
['@nuxtjs/dotenv', { path: './' }],
],
Upvotes: 3