nuxt / cli

⚡️ Nuxt Generation CLI Experience.
https://github.com/nuxt/cli/discussions/3
MIT License
239 stars 51 forks source link

Doesn't read NUXT_HOST from .env file #100

Closed BulgarianHealer closed 10 months ago

BulgarianHealer commented 10 months ago

Environment

Nuxt project info: 3:00:18 PM


Reproduction

https://codesandbox.io/p/sandbox/nuxtjs-3-7-0-gt3sj6?file=/app.vue:1,1

Describe the bug

After update to the latest version 3.7.0, after i run npm run dev, i saw that it doesn't run on the host from .env file.

I have tried with several ways like HOST, NITRO_HOST in the package.json file but it doesn't want to work. I have tried with removing .nuxt folder and node_modules but still the same, on the reproduction i dont think that it will work, because there is no interface with that ip at all.

Additional context

No response

Logs

No response

george-martinec commented 10 months ago

same

pi0 commented 10 months ago

Sorry for the inconvenience. Several fixes were added to nuxi 3.7.2 in order to address this issue.

You can self-update using npx nuxi upgrade --force and make sure to use 3.7.2+ using npx nuxi info.

If you still having issues, don't hesitate to ping me.

BulgarianHealer commented 10 months ago

Thanks, now it working.

I have a question, so with the bug i had to add --host to expose the local and wan ip address, also i got an QR code, without it was listening on localhost only, is there a way to disable expose the local/wan ip or remove the QR code now?

I'm running npm run dev (nuxt dev) without any options. @pi0

pi0 commented 10 months ago

You can use --host 127.0.0.1 (or IP of your desired loopback/NIC) to avoid exposing to wan and --no-qr to disable displaying QR code when IP is exposed.