skip to Main Content

Javascript – ts-node cannot find dependent module

Assume to have simple typescript program having two files: src/hello.js export default function hello() { return 'Hello world' } src/say.js import hello from './hello.js' console.log(hello()) with the following tsconfig.json { "compilerOptions": { "lib": ["es2023"], "module": "node16", "target": "es2022", "strict": true,…

VIEW QUESTION

Visual Studio Code – VSCode ts-node/register launches old compiled JS file instead of the specified TS file

I have the following launch.json for my TypeScript project in Visual Studio Code: { "version": "0.2.0", "configurations": [ { "name": "Launch task", "type": "node", "request": "launch", "program": "${workspaceFolder}/src/index.ts", "cwd": "${workspaceFolder}/src", "runtimeArgs": [ "-r", "ts-node/register" ], "env": { "NODE_ENV": "development" },…

VIEW QUESTION
Back To Top
Search