Upgrade to ng10 issue: invalid JSON character: \n #18038
Labels
area: @schematics/angular
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Milestone
Uh oh!
There was an error while loading. Please reload this page.
🐞 Bug report
Command (mark with an
x
)Is this a regression?
not really, more an upgrade problem
Description
During upgrade from 9.1.9 to 10; and running the upgrade script.

We get this error during the tsconfig.json upgrade step:
however, we don't have any tsconfig.json that is 30 lines long.
The tsconfig.jsons we have are:
./tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"downlevelIteration": true,
"module": "esnext",
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": ["node_modules/@types"],
"lib": ["es2016", "dom"],
"types": ["gapi", "gapi.auth2", "gapi.client.sheets"]
},
"exclude": ["node_modules", "spec", "cypress"]
}
./tsconfig.spec.json
//used by jest
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "./out-tsc/spec",
"types": [
"jest",
"node"
],
"esModuleInterop": false,
"emitDecoratorMetadata": true
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"spec/tests//*.spec.ts",
"spec/tests//*.d.ts"
]
}
./src/tsconfig.app.json:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "",
"types": ["node", "jquery", "hammerjs", "bowser", "google.analytics", "stripe-v3", "gapi", "gapi.auth2", "gapi.client.sheets", "color"],
"paths": {
"jszip": ["../node_modules/jszip/dist/jszip.min.js"]
}
},
"files": ["main.ts", "polyfills.ts"]
}
./cypress/tsconfig.json:
{
"compilerOptions": {
"strict": false,
"baseUrl": "../node_modules",
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
},
"include": [
"**/*.ts"
]
}
./functions/tsconfig.json:
{
"compilerOptions": {
"lib": [
"esnext",
"dom"
],
"types": ["googlemaps"],
"module": "commonjs",
"noImplicitReturns": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"outDir": "lib",
"sourceMap": true,
"target": "es2017"
},
"compileOnSave": true,
"include": [
"src"
]
}
🌍 Your Environment
windows 10, webstorm, npm.
The text was updated successfully, but these errors were encountered: