Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error upgrading from angular 11.2 to 12.2 - styles.css - Error: (0 , _identifier.getUndoPath) is not a function

Like the title says, I'm getting an error building my angular app after using the ng cli to upgrade from angular 11.2 to 12.2:

styles.css - Error: (0 , _identifier.getUndoPath) is not a function

I don't have a styles.css file (using styles.scss), nor do I see anywhere that file is referenced. Any idea what the issue could be?

like image 981
Lee Warner Avatar asked Aug 09 '21 20:08

Lee Warner


2 Answers

@angular-devkit/[email protected] seems to be the issue. Downgrading it to 12.1.1 fixes the issue for me (while the Angular team fixes the real thing)

like image 145
Maslow Avatar answered Oct 03 '22 06:10

Maslow


For me deleting package.lock & node_modules/* fixed the issue.

Source: https://github.com/angular/angular-cli/issues/21567 | https://github.com/angular/angular-cli/issues/21628

like image 31
Yohan Dahmani Avatar answered Oct 03 '22 06:10

Yohan Dahmani