I have installed typescript in my project and it works fine on the frontend. on the backend I have a node express server. I've started implementing TS there. when I ran the server just now it failed with:
filename: (req: Request, file, cb) => {
SyntaxError: Invalid or unexpected token
(pointing at the :
)
How can I make TS work on the server?
I've installed esm
which allows me to use imports, I've also included:
"module": "commonjs"
in the package.json
how do I fix this?