#Environment variable not found on run in mode production

33 messages · Page 1 of 1 (latest)

summer ember
#

Hey guys, I am make a app and use file.cmd for set Envs Variables only for this .cmd but this not working when I use for run with app built.

#

running development

#

dot cmd running development mode

#

Browser log

#

realize that have value for my public variable myValue

#

but in production mode

#

Running production mode

#

dot cmd running production mode

#

Browser log

#

not see the value

#

but he exist in env by cmd

#

nuxt.config

#

deploy.js

#

I use nitro preset node because a I need change port for production, I not found solution for this using preset default

#

If someone can help, I appreciete ❤️

summer ember
#

Environment variable not found on run in mode production

summer ember
#

I solved

#

this video help me

#

<@&747472278664773714> I believe this about override value using NUXT_PUBLIC should be in docs of runtimeConfig

summer ember
#

omg, its you

#

brow you are the god in my world today

summer ember
unreal hamlet
summer ember
unreal hamlet
# summer ember okay, I will, thanks.

FYI I tried to cover the "overriding" behaviour in https://github.com/nuxt/nuxt/pull/24612 - but yes, feel free to adapt/reword if something else resonates better or is more clear ☺️

GitHub

❓ Type of change

📖 Documentation (updates to the documentation, readme or JSdoc annotations)
🐞 Bug fix (a non-breaking change that fixes an issue)
👌 Enhancement (improving an existing function...