New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deploy to Netlify when using @Nuxt/dotenv #13

stuartjnelson opened this Issue Mar 24, 2018 · 4 comments


None yet
4 participants

stuartjnelson commented Mar 24, 2018


I've been unable to deploy to Netlify when using the plugin.

  • "@nuxtjs/dotenv": "^1.1.0"
  • "nuxt": "^1.0.0"
modules: [

Netlfiy Error log when using the module
Netfliy log for successful deployment

I've tried a whole bunch of different configurations inside nuxt.config.js but could'nt get anything to work. I don't get the issue when I generate the static site locally just when using Netlify. I have spoke to their support and they can't see the issue. I am wondering if its to do with the NPM WARN about missing optional dependencies? Let me know if you need anymore info!

This question is available on Nuxt.js community (#c7)

This comment has been minimized.

VitorLuizC commented Mar 24, 2018

Its because @nuxtjs/dotenv can't use system's variables when .env file is not found #12.

You can deploy .env file too. It's a bad practice, but works.


This comment has been minimized.

stuartjnelson commented Mar 25, 2018

Thanks @VitorLuizC. I'll close for now then if that ticket is dealing with it. I think I've got a way round it as I just needed the .env for a Google analytics and I got a sneaky fix from this issue ticket for that use case


This comment has been minimized.


JulienTant commented Mar 25, 2018

Hi, i've just published v1.1.1, now .env file is not mandatory !

stanosmith added a commit to stanosmith/mls that referenced this issue May 2, 2018


This comment has been minimized.

lmrarturo commented Nov 26, 2018

Hi guys,

How are you implementing the variables without .env with Netlify? for me is not working.


Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment