Nativescript / TypeScript error - error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'
Asked Answered
E

3

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

Above is my tsconfig.json . I'm getting an error that I'm not understanding why i'm getting. any thoughts?

Here's the errors in debug console in vscode i'm getting

[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.
Evade answered 4/2, 2017 at 13:39 Comment(3)
In that file - remove the sourceMap option - ts won't generate the .map files any more. Not sure where the inlineSourceMap is specified.Azole
thank you so much that fixed it :-)Evade
@Azole It didnt work out for me #46433644Fluctuation
E
10

dashman's answer of removing the source map option from tsconfig.json was what fixed it.

Evade answered 4/2, 2017 at 15:49 Comment(0)
J
1

As mentioned by @dashmam, the inlineSourceMap compiler option is lurking around somewhere.

For me, I had it specified in my webpack config. You must either remove/switch inlineSourceMap: true or sourceMap: true.

Also worth investigating - if your tsconfig.json extends another tsconfig.json, you may want to look there for a similar conflict 👍

Jailhouse answered 15/7, 2022 at 7:1 Comment(0)
S
0

In my case it didn't work to remove the sourceMap: true, in fact it is not necessary to remove it. The problem was my company's network restrictions. I connected to my mobile data and the error disappeared.

Shotwell answered 11/3 at 13:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.