#Source map error after trying to add vscode support for ts-node

12 messages · Page 1 of 1 (latest)

remote ginkgo
#

https://typestrong.org/ts-node/docs/recipes/visual-studio-code/
I followed this tutorial for vscode support for ts-node so I can launch typescript code for nodejs. I managed to make it work but now it gives this error every time I launch it:
Could not read source map for file:///C:/Users/ntt20/Desktop/Scripts/node_js_learning/node_modules/typescript/lib/typescript.js: ENOENT: no such file or directory, open 'c:\Users\ntt20\Desktop\Scripts\node_js_learning\node_modules\typescript\lib\typescript.js.map'
Is anyone familiar with this error and know how to solve it?

Create a new Node.js debug configuration, add -r ts-node/register to node args and move the program to the args list (so VS Code doesn't look for outFiles).

remote ginkgo
#

sorry

short crescent
#

👍🏻

#

This?

remote ginkgo
#

let me check

short crescent
#

I don't use ts-node, or VS Code debugger, so I can't give you much more specific

#

I think that code might be just for VS Code debugger? For normal execution you would just add a command in package.json scripts I think

remote ginkgo
short crescent
#

OK