You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now i can use console.redBg(). It works well in most time but when hot-reload some server's file
I got this error.
Property 'redBg' does not exist on type 'Console'.
>> console.redBg("error", error);
consoleColorFy.ts, which is imported first, will always work because all code starts from index.ts.
But when ts-node-dev run hot-reloaded by change of code, it seems to only rework some file. and it dose not recognise my consoleColorFy.ts Hum.... any advice?
I'm facing a similar problem. I've a logger declared as global variable.
In app.ts
import {log, Logger} from 'bluelog'
declare global {
var log: Logger
}
global.log = log
console.log('log', log)
In another file I've: log("log something")
When the application starts, all logs work fine. If any error inducing code is added and then fixed, the terminal starts throwing log not found error. Then, again I have to exit and restart server, Hot reload is not able to find it. Sometimes it works too.
My server
index.ts
file importconsoleColorFy.ts
consoleColorFy.ts
Now i can use
console.redBg()
.It works well in most time but when hot-reload some server's file
I got this error.
consoleColorFy.ts
, which is imported first, will always work because all code starts fromindex.ts
.But when
ts-node-dev
runhot-reloaded
by change of code, it seems to only rework some file. and it dose not recognise myconsoleColorFy.ts
Hum.... any advice?"ts-node-dev --respawn --no-notify --rs src/index.ts --env=dev"
It works well when I restart server
ts-node-dev": "^1.1.1"
The text was updated successfully, but these errors were encountered: