Skip to content
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

nuxi does not load .env file for NUXT_HOST and NUXT_PORT #14365

Closed
jonathanmach opened this issue Jul 24, 2022 · 2 comments · Fixed by nuxt/framework#6119
Closed

nuxi does not load .env file for NUXT_HOST and NUXT_PORT #14365

jonathanmach opened this issue Jul 24, 2022 · 2 comments · Fixed by nuxt/framework#6119

Comments

@jonathanmach
Copy link

Environment

Nuxt CLI v3.0.0-rc.6 22:43:53
RootDir: /home/projects/nuxt-starter-gjowlv 22:43:54
Nuxt project info: 22:43:54


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 2.16.0-27616340.013f051b
  • Package Manager: npm@7.17.0
  • Builder: webpack
  • User Config: head, css, plugins, components, buildModules, modules, build, serverHandlers, devServerHandlers, bridge
  • Runtime Modules: -
  • Build Modules: (), @nuxt/bridge@3.0.0-27639120.e7a7f9b

Reproduction

https://stackblitz.com/edit/nuxt-starter-gjowlv?file=.env

Describe the bug

I have created a .env file in my project root folder and included the NUXT_PORT variable. However, Nuxt Bridge doesn't seem to load the .env config.

Additional context

No response

Logs

No response

@jonathanmach jonathanmach changed the title Nuxt Bridge does not load .env variables Nuxt Bridge does not load .env file Jul 24, 2022
@danielroe danielroe transferred this issue from nuxt/framework Jul 25, 2022
@danielroe
Copy link
Member

For PORT and HOST, you will need to specify these on the command line or manually read in your .env file.

@danielroe danielroe transferred this issue from nuxt/bridge Jul 25, 2022
@danielroe danielroe changed the title Nuxt Bridge does not load .env file nuxi does not load .env file for NUXT_HOST and NUXT_PORT Jul 25, 2022
@danielroe danielroe self-assigned this Jul 25, 2022
@jonathanmach
Copy link
Author

Thanks so much, guys!
Really appreciate it 🙏

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants