Skip to content

Upgrade to ng10 issue: invalid JSON character: \n #18038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LanderBeeuwsaert opened this issue Jun 26, 2020 · 3 comments · Fixed by #18015
Closed

Upgrade to ng10 issue: invalid JSON character: \n #18038

LanderBeeuwsaert opened this issue Jun 26, 2020 · 3 comments · Fixed by #18015
Assignees
Labels
area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@LanderBeeuwsaert
Copy link

LanderBeeuwsaert commented Jun 26, 2020

🐞 Bug report

Command (mark with an x)

  • [ X] update

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:
image
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.

@alan-agius4
Copy link
Collaborator

@LanderBeeuwsaert, the issue might be arising from any file with a .json extension.

We have a fix incoming which when an error occurs we print out the file name of the offending file.

@LanderBeeuwsaert
Copy link
Author

@alan-agius4 yeah, I was thinking that yesterday, if I would have the name of the offending file I'm almost certainly ok. Thanks!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants