Nativescript / TypeScript错误 - 错误TS5053:选项' sourceMap'无法使用选项' inlineSourceMap'指定

时间:2017-02-04 13:39:28

标签: typescript visual-studio-code nativescript angular2-nativescript

{
"compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "sourceMap": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "noEmitHelpers": true,
    "noEmitOnError": true,
    "watch": true
},
"exclude": [
    "node_modules",
    "platforms"
],
"compileOnSave": true
}

上面是我的tsconfig.json。我收到的错误是我不理解我为什么会这样做。有什么想法吗?

这是vscode中调试控制台中的错误我得到

[NativeScriptCli] execute: tns --version
[NSDebugAdapter] Using tns CLI v2.5.0 on path 'tns'
[NSDebugAdapter] Running tns command...
[NativeScriptCli] execute: tns debug ios --no-client --watch 
[NSDebugAdapter] Watching the tns CLI output to receive a connection token
Executing before-prepare hook from /Users/USERNAME/Projects/Project-tns/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /Users/USERNAME/Projects/Project-tns/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.2.0
error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.
7:34:42 AM - Compilation complete. Watching for file changes.

1 个答案:

答案 0 :(得分:4)

dashman从tsconfig.json中删除源映射选项的答案是解决它的原因。