chore(cli): Prevent swallowing error in non production env (#11534)
This commit is contained in:
1 parent
0307304dc6
commit
0a95c6f6df
1 file changed
+9
-1
@@ -3,6 +3,14 @@
|
|||||||
try {
|
try {
|
||||||
require("ts-node").register({})
|
require("ts-node").register({})
|
||||||
require("tsconfig-paths").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("dotenv").config()
|
||||||
require("./dist/index.js")
|
require("./dist/index.js")
|
||||||
Reference in new issue
Block a user