NODE_ENV undefined with typescript and nodemon
minotaurrr opened this issue · comments
Min commented
cross-env
version: 5.2.0node
version: 10.12.0npm
(oryarn
) 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.
Fei Liu commented
Kent C. Dodds commented
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.
Cristian Eriomenco commented
@minotaurrr 17 thumbs up i'm encountering same issue, did you found a fix?