4

On our project, we are using NX.Dev Workspace of version 11.5.1 with Angular of version 11.2.0 and we are trying to update to latest Angular (12.0.5), but once I run command nx migrate latest (which is suggested to me by NX.Dev) I always end-up with this error:

nx migrate latest
Fetching meta data about packages.
It may take a few minutes.
Fetching @nrwl/workspace@latest

 ERROR  The migrate command failed.

**EBUSY: resource busy or locked, rmdir 'C:\Users\[UserId]\AppData\Local\Temp\1\tmp-4504-WWkjlwgkPAd0'**
C:\SRDEV\_PROJECTS\[ProjectName]\frontend\[WebFolder]\node_modules\yargs\build\lib\yargs.js:1132 throw err;

We tried:

git checkout .
git clean -f .
rm -rf node_modules
npm install (or yarn install)
nx migrate latest
npm install (or yarn install)
nx migrate --run-migrations=migrations.json

OR

1. delete package-lock
2. npm cache clean
3. npm install --cache
4. nx migrate latest

OR

FORCE_NG_UPDATE=true ng update
  • this is not throwing above error, but instead it throws 'FORCE_NG_UPDATE' as unrecognized command (not sure what should I enter here)

Did anyone faced similar issues? I did google for this and read a lot of forum threads and tried some of the possible solutions (above mentioned, not working).

Our package.json:

"dependencies": {
    "@ag-grid-community/all-modules": "^25.1.0",
    "@ag-grid-community/angular": "^25.1.0",
    "@angular/animations": "^11.2.0",
    "@angular/cdk": "^11.2.5",
    "@angular/common": "^11.2.0",
    "@angular/compiler": "^11.2.0",
    "@angular/core": "^11.2.0",
    "@angular/flex-layout": "11.0.0-beta.33",
    "@angular/forms": "^11.2.0",
    "@angular/material": "^11.2.5",
    "@angular/material-moment-adapter": "^11.2.5",
    "@angular/platform-browser": "^11.2.0",
    "@angular/platform-browser-dynamic": "^11.2.0",
    "@angular/router": "^11.2.0",
    "@nrwl/angular": "11.5.1",
    "rxjs": "~6.6.3",
    "tslib": "^2.0.0",
    "zone.js": "^0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1102.0",
    "@angular-eslint/eslint-plugin": "~1.0.0",
    "@angular-eslint/eslint-plugin-template": "~1.0.0",
    "@angular-eslint/template-parser": "~1.0.0",
    "@angular/cli": "~11.0.0",
    "@angular/compiler-cli": "^11.2.0",
    "@angular/language-service": "^11.2.0",
    "@nrwl/cli": "11.5.1",
    "@nrwl/cypress": "11.5.1",
    "@nrwl/eslint-plugin-nx": "11.5.1",
    "@nrwl/jest": "11.5.1",
    "@nrwl/linter": "11.5.1",
    "@nrwl/tao": "11.5.1",
    "@nrwl/workspace": "11.5.1",
    "@types/jest": "26.0.8",
    "@types/node": "12.12.38",
    "@typescript-eslint/eslint-plugin": "4.3.0",
    "@typescript-eslint/parser": "4.3.0",
    "cypress": "^6.0.1",
    "dotenv": "6.2.0",
    "eslint": "7.10.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "jest": "26.2.2",
    "jest-preset-angular": "8.3.2",
    "nswag": "^13.10.8",
    "prettier": "2.2.1",
    "ts-jest": "26.4.0",
    "ts-node": "~9.1.1",
    "typescript": "~4.0.3",
    "webpack-bundle-analyzer": "4.4.0"
  }

Thank you guys for any help!

Pajchel
  • 41
  • 2

0 Answers0