Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

261
Views
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?

over 4 years ago · Santiago Trujillo
7 answers
Answer question

0

You might want to check if styles.css is being imported and used anywhere inside your code.

over 4 years ago · Santiago Trujillo Report

0

When I upgraded my angular framework to 12, I struggled with many scss problems. The problem is that the @angular/cli package interprets the packages in the assets folder as external links. I have now downgraded my angular version to 11. If you can manage to interpret your assets directory as , the problem may be solved.

something like this in angular.json

"assets": [
              ...
              {
                "glob": "**/*.scss",
                "input": "src/assets/",
                "ignore": ["**/*.scss"],
                "output": "/assets/"
              },
              {
                "glob": "**/*.md",
                "input": "docs",
                "output": "/assets/docs"
              }
            ],

over 4 years ago · Santiago Trujillo Report

0

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

over 4 years ago · Santiago Trujillo Report

0

for me downgrading the @angular-devkit/build-angular package didn't work, but I looked a little dipper, and I see that webpack is calling this function, so I upgraded the webpack package ("webpack": "^5.50.0"), and this solved the problem.

over 4 years ago · Santiago Trujillo Report

0

Fixed for me by installing mini-css-extract-plugin in devDependencies.

See https://github.com/angular/angular-cli/issues/21628#issuecomment-909388037

over 4 years ago · Santiago Trujillo Report

0

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

over 4 years ago · Santiago Trujillo Report

0

my version is v12.2.7, and the solution is npm i webpack

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!