Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

262
Visualizações
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 Respostas
Responde à pergunta

0

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

over 4 years ago · Santiago Trujillo Relatório

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 Relatório

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 Relatório

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 Relatório

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 Relatório

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 Relatório

0

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

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda