chore(cli): Prevent swallowing error in non production env (#11534)
This commit is contained in:
committed by
GitHub
parent
0307304dc6
commit
0a95c6f6df
@@ -3,6 +3,14 @@
|
||||
try {
|
||||
require("ts-node").register({})
|
||||
require("tsconfig-paths").register({})
|
||||
} catch {}
|
||||
} catch (e) {
|
||||
const isProduction = process.env.NODE_ENV === "production"
|
||||
if (!isProduction) {
|
||||
console.warn(
|
||||
"ts-node cannot be loaded and used, if you are running in production don't forget to set your NODE_ENV to production"
|
||||
)
|
||||
console.warn(e)
|
||||
}
|
||||
}
|
||||
require("dotenv").config()
|
||||
require("./dist/index.js")
|
||||
|
||||
Reference in New Issue
Block a user