Next.js Discord

Discord Forum

Next 14 | NX workspace

Unanswered
Exotic Shorthair posted this in #help-forum
Open in Discord
Exotic ShorthairOP
Hey!
I am trying to migrate my nx workspace to next 14
In my repo I have both frontend and backend applications.
Both are using my .local.env file.

I have a few questions:
In my env file i've hard coded NODE_ENV, when I am running a build I get an error:
⚠ You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env

This is how my NODE_ENV is setup => NODE_ENV=development.
I understand that next set it up for me, but I want to keep using the this var as both my frontend and backend uses, is there an option to do so or would next always yell at me for it?

Another question I have is this:
When running the build I get this message:
  ▲ Next.js 14.2.9
  - Environments: .env

From what I understand it it uses the file .env for env vars, I don't have such a file and I don't see in the build folder, I also see that it keeps using .local.env for window.__ENV, so what is the meaning of it?

0 Replies