A
A
Al2017-09-02 00:33:05
Node.js
Al, 2017-09-02 00:33:05

Why does node in console show stacktrace with js files and not ts?

My ts.config:

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "outDir": "gen",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false,
    "lib": ["dom", "es5", "es6", "es2015.promise", "es2015.iterable", "es2015.collection", "es2015.reflect", "es2015.proxy"],
    "moduleResolution": "node",
    "typeRoots" : ["node_modules/@types"],
    "noUnusedLocals": false,
    "exclude": [
      "node_modules"
    ]
  }
}

When I look at the log with errors in the console, the stack trace contains links to js files and not ts:
Error: ENOENT: no such file or directory, stat 'E:\test\gen\app\www\img\favicon.png'
    at Error (native)
    at Object.fs.statSync (fs.js:1000:11)
    at resolveSync (E:\test\node_modules\serve-favicon\index.js:172:17)
    at favicon (E:\test\node_modules\serve-favicon\index.js:61:12)
    at Object.<anonymous> (E:\test\gen\app\App.js:42:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

Process finished with exit code 1

It is not clear why this is so, while the breaks in the debugger work in ts-files.
Tell me what can be done so that the links in the log were to ts-files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Coder321, 2017-09-02
@Coder321

Because you are running a js file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question