You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently using Vike 0.4.159 and would like to upgrade.
However, when doing so the following error appears during development.
Error: [vike][Wrong Usage] Vite's development server was instantiated while the environment is set to be a production environment by process.env.NODE_ENV === "local" which is contradictory, see https://vike.dev/NODE_ENV
the reason is that our NODE_ENV is set to local. We cannot easily change this to the legal values since our DB client actually uses NODE_ENV to check which db to connect to. Admittedly coupling NODE_ENV to our environemnts this way is not great and I think we should change it because it is abusing the meaning of NODE_ENV somehow and should use something independent of that. However, this isn't easily done and it'll mean we won't be able to upgrade Vike as long as this is a hard failure.
The errors are now warnings. Released in 0.4.164. The plan is to make them errors again while enabling users to whitelist NODE_ENV values with a new setting allowNodeEnv.
Description
We're currently using Vike
0.4.159
and would like to upgrade.However, when doing so the following error appears during development.
the reason is that our NODE_ENV is set to
local
. We cannot easily change this to the legal values since our DB client actually uses NODE_ENV to check which db to connect to. Admittedly coupling NODE_ENV to our environemnts this way is not great and I think we should change it because it is abusing the meaning of NODE_ENV somehow and should use something independent of that. However, this isn't easily done and it'll mean we won't be able to upgrade Vike as long as this is a hard failure.It seems that this was changed from a warning to a hard error in 0.4.160 and I saw the comment in this line of code f3926bd#diff-ededd76b0d3273090e9e067d374a96da68bc29ac17b347436dc316b89f0e8810R91
so I just wanted to provide a data point that this is indeed for us an upgrade blocker atm.
The text was updated successfully, but these errors were encountered: