-
Notifications
You must be signed in to change notification settings - Fork 12k
Invalid JSON AST error #18120
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
Comments
Delete the "dist" folder from the last build. I had an old broken file in there. |
@MeForThis I did empty the |
Maybe the files have the encoding UTF-8-BOM. Change them all to UTF-8 and it will work. |
I double checked and all the |
I had a file named |
Thanks for the tip @jonyadamit . However the error remains surprising and I wonder if the problem is more that the JSON file contents do not match some expected schema ( |
@Javarome yes, obviously business JSON files should be ignored by the migration process. As this issue is tagged as broken/bug I suppose it will be addressed as you suggest. |
Hi all, in the next patch version of the CLI. instead of an erroring out when we encounter a JSON file which the JSON parser cannot parse, we will display a warning. @Javarome, the problem here is not caused by a mismatch against a schema but rather the JSON file contents cannot be parsed to a valid JSON AST object. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: 9.1.9.Description
When issuing `ng update @angular/cli` the migration process goes fine up to this step where it complains about a ngx-translate file:🔬 Minimal Reproduction
run
ng update @angular/cli
on a codebase that includes ngx-translate translationfr.json
file, structured like this:🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
The potential JSON files were pasted in a JSON validator with success.
Only the filename is specified (not the full path, which may have helped as I have multiple files with this name in different directories).
Also, the original parsing error is not displayed (this would have helped also).
The text was updated successfully, but these errors were encountered: