Ask coding questions
Hi guys, if I create a .ts file inside a Nodejs Project, Repl doesn't recognize the require keyword. There is a solution?
I know the TypeScript Project, but I have to use a Nodejs Project.
Use a typescript repl if you are using Typescript. It runs node.js and has TSC installed. It will automatically compile all typescript files at runtime.
You can try es modules instead.
it's the same. @EpicGamer007
@GIUSEPPEFERRI have you tried creating a ts repl?
"I know the TypeScript Project, but I have to use a Nodejs Project." @EpicGamer007
@GIUSEPPEFERRI hm.. then i am not sure, sorry. report it to bugs. Link this post and make sure to include images as well
Thanks for your help@EpicGamer007
I know that .js files work in a Nodejs project, but I have to use a .ts file inside a Nodejs project. @ch1ck3n