node.js – NODE_ENV value of ‘production’ did not match when running env.production in node

I am running a typescript node project with default environment variables .env which is running well, as the command is

ts-node-dev --respawn --transpile-only --exit-child src/app.ts

then I built a production environment env config file – env.production

running the production mode with the command as

 NODE_ENV=production ts-node-dev --respawn --transpile-only --exit-child src/app.ts

in the console output, it comes with the warming –

WARNING: NODE_ENV value of 'production' did not match any deployment config file names.

and the environment variables imported is also not the variables in .env.production file but variables in the .env file.

have no clues how to deal with this issue

Read more here: Source link