question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

styles.css - Error: (0 , _identifier.getUndoPath) is not a function, after ng server/build with Nx workspace

See original GitHub issue

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 12.1.0

Description

I generate a new Nx workspace (12.7.2) with Angular (12.1.0).

After updating ng from 12.1.0 to 12.2.2 I’m get the error Error: (0 , _identifier.getUndoPath) is not a function after run ng server or ng build.

Also, I removed execute ng from nx and delete "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main" from package.json.

πŸ”¬ Minimal Reproduction

https://github.com/AwesomeObserver/ng-styles-bug

πŸ”₯ Exception or Error


// with ng server
styles.css - Error: (0 , _identifier.getUndoPath) is not a function
// with ng build
styles.c331d6dc3ee8f876a7f8.css - Error: (0 , _identifier.getUndoPath) is not a function

🌍 Your Environment


Angular CLI: 12.2.2
Node: 14.15.0
Package Manager: npm 6.14.8
OS: win32 x64

Angular: 12.2.2
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.2
@angular-devkit/build-angular   12.2.2
@angular-devkit/core            12.1.4
@angular-devkit/schematics      12.1.4
@schematics/angular             12.1.4
rxjs                            6.6.7
typescript                      4.3.5

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
npalaciocommented, Aug 31, 2021

Installing mini-css-extract-plugin@2.2.1 to my dev dependencies fixed this issue for me

2reactions
Burgovcommented, Sep 13, 2021

Installing mini-css-extract-plugin@2.2.1 to my dev dependencies fixed this issue for me

This fixed it for me too, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error upgrading from angular 11.2 to 12.2 - styles.css
Like the title says, I'm getting an error building my angular app after using the ng cli to upgradeΒ ...
Read more >
styles.css - Error: (0 , _identifier.getUndoPath) is not a function
I got the following error while running npm run start in the Angular+NX workspace project: styles.css - Error: (0 , _identifier.getUndoPath)Β ...
Read more >
Nx: Smart, Fast and Extensible Build System
Nx analyzes your project graph and can diff it against a baseline to determine which projects changed and what tasks need to be...
Read more >
nrwl-nx/community - Gitter
I'm trying to run jest tests in a nx workspace via webstorm and am getting an error where scss is not being sucked...
Read more >
3 - Generating components and Nx lib - Angular and NgRx
nx generate @nrwl/angular:library [name] [options,...] ; --style The file extension to be used for style files. (default: css) ; --routing Add router configuration....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found