Nx Upgrade from v11 to v12.10.1 is giving "Module not found" error during migration

Viewed 126

I am currently on Nx version 11 using Angular 11 in my project. I am trying to upgrade Nx to v12.10.1. I believe it is the last update of Nx to use Angular 12 in my project. So far, here is what I did.

  1. Update Node to v18.3.0

  2. Update NPM to v8.11.0

  3. Run command npx nx migrate 12.10.1

Fetching meta data about packages.
It may take a few minutes.
Fetching @nrwl/workspace@12.10.1
Fetching @nrwl/cypress@12.10.1
Fetching @nrwl/angular@12.10.1
Fetching @nrwl/jest@12.10.1
Fetching @nrwl/linter@12.10.1
Fetching @ngrx/effects@12.4.0
Fetching @ngrx/store@12.4.0
Fetching @ngrx/store-devtools@12.4.0
Fetching @angular/material@12.2.13
Fetching @angular/core@12.2.16
Fetching @angular/cdk@12.2.13
Fetching @angular/cli@12.2.17
Fetching @ngrx/router-store@12.4.0
Fetching @angular/cli@~12.2.0
  1. No errors. Hence, continue.

  2. rm -rf node_modules/ package-lock.json To do it fresh installation.

  3. fresh npm install

  4. Run command npx nx migrate --run-migrations

  5. Got an error as code: MODULE_NOT_FOUND. "Cannot find module @nrwl/tao/src/utils/app-root". screenshot attached. Nx module not found error

Any ideas on how to fix this?

0 Answers
Related