【问题标题】:Nativescript / TypeScript error - error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'Nativescript / TypeScript 错误 - 错误 TS5053:无法使用选项“inlineSourceMap”指定选项“sourceMap”
【发布时间】:2017-06-21 19:36:33
【问题描述】:
{
"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.

【问题讨论】:

  • 在该文件中 - 删除 sourceMap 选项 - ts 将不再生成 .map 文件。不确定在哪里指定了 inlineSourceMap。
  • 非常感谢您修复它:-)

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


【解决方案1】:

dashman 从 tsconfig.json 中删除源映射选项的答案是修复它。

【讨论】:

    猜你喜欢
    • 2014-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-26
    • 2014-09-21
    • 2015-06-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多