Next.js Discord

Discord Forum

How to get new values from .env file without restart the whole thing?

Unanswered
Golden northern bumble bee posted this in #help-forum
Open in Discord
Golden northern bumble beeOP
Currently, if I edit something in the .env file, I have to restart npm run dev which takes a lot of time.
Is there a way to get the updated values?

3 Replies

@Golden northern bumble bee Currently, if I edit something in the .env file, I have to restart `npm run dev` which takes a lot of time. Is there a way to get the updated values?
What nextjs version are you using? The dev server should already automatically restart on .env change from nextjs 13.3
@joulev What nextjs version are you using? The dev server should already automatically restart on .env change from nextjs 13.3
Golden northern bumble beeOP
Thanks @joulev
We're still on 12.3.4 😦
@Golden northern bumble bee Thanks <@484037068239142956> We're still on 12.3.4 😦
Oh well… then unfortunately there is no way to do that. Upgrade to 13 and 14 whenever possible, there are very few breaking changes between each major regarding the pages router (you do not have to migrate to the app router)