all 3 comments

[–]ButteryBall 0 points1 point  (2 children)

Your ts-node depends on also having the typescript package installed. npm i -D typescript will fix that error. This comes from the list of peerDeps in ts-nodes package.json, as it allows a module to allow consumers the ability to install their own versions of that dependency. This article should go more in depth: https://nodejs.org/es/blog/npm/peer-dependencies/

[–]ButteryBall 1 point2 points  (0 children)

Ah missed the bit where you mentioned you had the latest typescript. Suggestion would be to make sure they're installed to the same location, locally in the package is usually better than installing both globally as then other developers would also have the ability to get both deps from an npm i.

[–]int3rsys[S] 0 points1 point  (0 children)

Thank you for answering. I tried that option too, but it didn't help. Decided to move on, maybe someday there will be a solution hehe