You need to set your NODE_ENV like this in your .env file : NEXT_PUBLIC_NODE_ENV=production
I found this explanation on this thread of this community : Can't read environment variables from Nextjs project
This will help other people because difficult to find this solution !