kentcdodds / cross-env

🔀 Cross platform setting of environment scripts

Home Page:https://www.npmjs.com/package/cross-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NODE_ENV undefined with typescript and nodemon

minotaurrr opened this issue · comments

commented
  • cross-env version: 5.2.0
  • node version: 10.12.0
  • npm (or yarn) version: 6.4.1

Relevant code or config

"dev:ts": "cross-env NODE_ENV=production tsc-watch --onSuccess \"node ./node_modules/nodemon/bin/nodemon.js dist/main.js\""

"dev:ts": "tsc-watch --onSuccess \"cross-env NODE_ENV=production node ./node_modules/nodemon/bin/nodemon.js dist/main.js\""

Tried both commands above but console.log(process.env.NODE_ENV) prints undefined.

Any help is appreciated.

Can't reproduce. The environment looks fine.

Screenshot 2019-09-20 at 17 31 51

Sorry for not responding to this earlier. It's been long enough that I'm going to close this issue. If you're still experiencing problems, please open a new issue.

@minotaurrr 17 thumbs up i'm encountering same issue, did you found a fix?