Skip to content

Error: (0 , _identifier.getUndoPath) is not a function #6612

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

Closed
muuvmuuv opened this issue Aug 5, 2021 · 19 comments · Fixed by #6620
Closed

Error: (0 , _identifier.getUndoPath) is not a function #6612

muuvmuuv opened this issue Aug 5, 2021 · 19 comments · Fixed by #6620
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@muuvmuuv
Copy link
Contributor

muuvmuuv commented Aug 5, 2021

Current Behavior

I am trying to build my Angular Ionic application and followed this guide here: https://ionicframework.com/blog/ionic-angular-monorepos-with-nx/

Unfortunately I am getting the below error when running nx build:

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

Expected Behavior

Steps to Reproduce

Follow this guide:

https://ionicframework.com/blog/ionic-angular-monorepos-with-nx/

Failure Logs

; nx build

> nx run entergon:build:production
✔ Browser application bundle generation complete.

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



———————————————————————————————————————————————

>  NX   ERROR  Running target "entergon:build" failed

  Failed tasks:

  - entergon:build:production

  Hint: run the command with --verbose for more details.

Environment

nx : 12.6.4
@nrwl/angular : 12.6.4
@nrwl/cli : 12.6.4
@nrwl/cypress : 12.6.4
@nrwl/devkit : 12.6.4
@nrwl/eslint-plugin-nx : 12.6.4
@nrwl/express : Not Found
@nrwl/jest : 12.6.4
@nrwl/linter : 12.6.4
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.6.4
@nrwl/web : Not Found
@nrwl/workspace : 12.6.4
@nrwl/storybook : 12.6.4
@nrwl/gatsby : Not Found
typescript : 4.3.5

@leosvelperez leosvelperez added the scope: angular Issues related to Angular support in Nx label Aug 5, 2021
@lian-ders
Copy link

lian-ders commented Aug 5, 2021

I got the same exact problem. I've generated a new nx workspace with angular and this error occurs. What seems to "work" is to remove the "styles" attribute from the angular.json file. This is no option however, because we need global styles 😅. Having a project with CSS or SCSS makes no difference and generates the same error.

@eggp
Copy link

eggp commented Aug 5, 2021

I also have the error...
Test flow:

  • create new workspace(ver: 12.6.4).
  • add material with custom theme
  • build project and error ... :(

@eggp
Copy link

eggp commented Aug 5, 2021

@muuvmuuv my hotfix:
add your package.json devDependencies: "mini-css-extract-plugin": "2.2.0" and work build

@ShinRai1090
Copy link

mini-css-extract-plugin

this works! ... waiting for a proper fix though :)

@FrozenPandaz
Copy link
Collaborator

FrozenPandaz commented Aug 5, 2021

Hi all, sorry for the inconvenience. We are looking into this.

Meanwhile, I found the following to work after creating a new workspace.

1. rm -rf node_modules package-lock.json // Delete package-lock.json and node_modules
2. npm i // Install again

Things should work again. If not, please post the results of npm ls webpack

@eggp
Copy link

eggp commented Aug 5, 2021

Hi all, sorry for the inconvenience. We are looking into this.

Meanwhile, I found the following to work after creating a new workspace.

  1. rm -rf node_modules package-lock.json // Delete package-lock.json and node_modules
  2. npm i // Install again

Things should work again. If not, please post the results of npm ls webpack

i tried,
the error still existsÉ

npm ls webpack
image

@FrozenPandaz
Copy link
Collaborator

We just published 12.6.5 with a fix. Please use that version 😄

@eggp
Copy link

eggp commented Aug 5, 2021

thanks

@rnza0u
Copy link

rnza0u commented Aug 5, 2021

I migrated to 12.6.5 and ran npm install.

I still get the same error, unfortunetaly.

@rnza0u
Copy link

rnza0u commented Aug 5, 2021

I managed to fix an already created Angular project by manually updating package.json.

I simply changed "@angular-devkit/build-angular": "^12.1.0" to "@angular-devkit/build-angular": "~12.1.0", then ran npm install.

Now build is working.

@dhanush-tydy
Copy link

I managed to fix an already created Angular project by manually updating package.json.

I simply changed "@angular-devkit/build-angular": "^12.1.0" to "@angular-devkit/build-angular": "~12.1.0", then ran npm install.

Now build is working.

This works

@eggp
Copy link

eggp commented Aug 6, 2021

yes, in the case of a new installation, it also helped me to upgrade the angular package versions to a smaller version

however, for an existing project, the update solved the problem

@memo18j
Copy link

memo18j commented Aug 6, 2021

Logré arreglar un proyecto Angular ya creado actualizándolo manualmente package.json.

Simplemente me cambié "@angular-devkit/build-angular": "^12.1.0"a "@angular-devkit/build-angular": "~12.1.0", luego corrí npm install.

Ahora la compilación está funcionando.

Esta me funciono tambien

@ph55
Copy link

ph55 commented Aug 8, 2021

We just published 12.6.5 with a fix. Please use that version 😄

@FrozenPandaz Issue still exists in 12.6.5 and probably not related to NX.

I managed to fix an already created Angular project by manually updating package.json.

I simply changed "@angular-devkit/build-angular": "^12.1.0" to "@angular-devkit/build-angular": "~12.1.0", then ran npm install.

Now build is working.

Downgrading @angular-devkit/build-angular to 12.1.0 worked for me.
Thanks @Hakhenaton

@SerkanSipahi
Copy link

thanks @Hakhenaton :) It helped me as well.

@statyan
Copy link

statyan commented Aug 25, 2021

Installing of "mini-css-extract-plugin": "2.2.0" worked for me. I used the current latest 12.7.2 version of nx. Thanks @eggp a lot!

@fuerst
Copy link

fuerst commented Sep 9, 2021

Just a note: Using Nrwl 12.9.0 and Angular 12.2.5 it works now without any workaround.

@31piy
Copy link

31piy commented Oct 1, 2021

I saw this again today with Nrwl v12.9.0 and Angular 12.2.7. Downgrading Angular to 12.2.5 didn't work either. Installing "mini-css-extract-plugin" solved the problem.

torsten-simon pushed a commit to edu-sharing/edu-sharing-community-repository that referenced this issue Oct 21, 2021
- Add `.browserslistrc` to remove IE11 support (depricated)
- Remove option `showCircularDependencies` form `angular.json` (depricated)
- Downgrade `@angular-devkit/build-angular` to `12.1` (compile error,
  see nrwl/nx#6612)
- Remove `node-sass` (compile error, incompatible with latest Angular Material, deprecated)
- Update `angularx-qrcode` to 11.0 (compile error)
- Remove most deep imports into `rxjs` (compile warning: "CommonJS or
  AMD dependencies can cause optimization bailouts")
- Migrate to rxjs 6
- Remove `rxjs-compat`
- Switch from `/`-operator to `math.div`  in `.scss` files (depricated)
- Switch from ng5-slider to ngx-slider (deprecated)
- Remove MatAutocompleteTriggerAccessorDirective (not needed anymore,
  fixed with new Angular version)
- Angular options `baseHref` and `deployUrl` now under `build`
- Remove ngx-slimscroll (incompatability warning, was not used)
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.