简体   繁体   中英

Nx 13 Migration failure: update-tasks-runner

Background I have moved my Angular apps from 12 to 13.3.11.

What When running nx migrate 13.10.6 a migrations.json file is generated as expected.However, when running the migrations, it fails on the step "13-10-0-update-tasks-runner".

I get the following errors from Nx:

  • Failed to run 13-10-0-update-tasks-runner from @nrwl/workspace. This workspace is NOT up to date!
  • Cannot read property 'default' of undefined

Question What am I doing wrong, and/or how do I resolve this issue?

Stack trace:

TypeError: Cannot read property 'default' of undefined at updateTasksRunner (C:\Users\SD829695\Workspace\Payviewer UI\sdworx-workspace\node_modules@nrwl\workspace\src\migrations\update-13-10-0\update-tasks-runner.js:7:83) at C:\Users\SD829695\AppData\Local\Temp\tmp-22332-q4v32FBBq7aD\node_modules\nx\src\command-line\migrate.js:758:15 at Generator.next () at C:\Users\SD829695\AppData\Local\Temp\tmp-22332-q4v32FBBq7aD\node_modules\tslib\tslib.js:118:75 at new Promise () at Object.__awaiter (C:\Users\SD829695\AppData\Local\Temp\tmp-22332-q4v32FBBq7aD\node_modules\tslib\tslib.js:114:16) at runNxMigration (C:\Users\SD829695\AppData\Local\Temp\tmp-22332-q4v32FBBq7aD\node_modules\nx\src\command-line\migrate.js:737:20) at C:\Users\SD829695\AppData\Local\Temp\tmp-22332-q4v32FBBq7aD\node_modules\nx\src\command-line\migrate.js:631:43 at Generator.next () at fulfilled (C:\Users\SD829695\AppData\Local\Temp\tmp-22332-q4v32FBBq7aD\node_modules\tsl ib\tslib.js:115:62)

It turns out there is an issue with the migration scripts from Nx; they require you to have tasksRunnerOptions present in your nx.json file. So, I did that and was now able to run the migrations successfully. Apparently, this is an issue even in the 14. . migrations so I will leave it there until I see it is solved.

在此处输入图像描述

Full details of where I found the fix are in this GitHub issue: https://github.com/nrwl/nx/issues/10010

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM