-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
mdc-migration gives "character is out of bounds" without any context #27057
Comments
Looks like no components have been selected for the migration. |
It's not related to no components being selected, I've boiled it down to it being caused by files using the "UTF8 with BOM" or "Windows 1252" encoding causing the "magic-string" library to fail.
I found it by changing the file For those coming across this wanting to find their utf-8 with bom files easily, remove the "e" from the console log and "crash" the migration on purpose, it should list all your failing files. It is also possible for the It would be helpful if the cdk could tell you that a file failed instead of forcing us to "hack" the library and find the issue. |
Fixes that migrations may throw a "Character out of bounds" error if a template is using BOM. Fixes angular#27057.
Fixes that migrations may throw a "Character out of bounds" error if a template is using BOM. Fixes #27057.
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. |
Command
generate
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When I run:
ng generate @angular/material:mdc-migration
It asks me which directory and which components. No matter what I select, it shows the following right after:
Migrating components:
Migrating project: my-app
Character is out of bounds
No files get migrated. Nothing else happens. I don't know where I can look for the logs to see what exactly was out of bounds.
Minimal Reproduction
ng generate @angular/material:mdc-migration
leave blank for default
press enter for just 'button'
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: