-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
NX upgrade to 20 migration fails on module-federation-target-defaults #28377
Comments
same issue for me |
@armingdev do you try to update web pack file like this ? for me automatic tag was not in the good space. Now it's working fine |
Hi @linktogo , thx for a replay. Do you know if you use NxAppWebpackPlugin? It is not working when I put it in the nxWebpackConfig. |
@armingdev My assumption is that you have a project that doesn't use module federation but does have a target in the project.json using |
I use |
…@nx/react #28377 (#28382) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> Some executors using `@nx/webpack:webpack` point to a webpack config that is exported from the `@nx/react plugin. We do not want to try modify this. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Skip the migration if the webpack config points to the exported plugin from @nx/react. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #28377
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. |
…@nx/react nrwl#28377 (nrwl#28382) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> Some executors using `@nx/webpack:webpack` point to a webpack config that is exported from the `@nx/react plugin. We do not want to try modify this. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Skip the migration if the webpack config points to the exported plugin from @nx/react. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes nrwl#28377
…@nx/react #28377 (#28382) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> Some executors using `@nx/webpack:webpack` point to a webpack config that is exported from the `@nx/react plugin. We do not want to try modify this. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Skip the migration if the webpack config points to the exported plugin from @nx/react. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #28377 (cherry picked from commit a18adb7)
Current Behavior
Im trying to upgrade NX monorepo from 19.5.6 to 20.0.0. When I run
npx nx migrate latest
command runs successfully also asnpm i
. But when I runnpx nx migrate --run-migrations
I got error on migration : Running migration @nx/react: update-19-6-1-ensure-module-federation-target-defaultsInside my NX workspace are three apps : app - NextJS 14.2.3 , admin - React 18.3.1, API - NestJS
Expected Behavior
To upgrade workspace successfully.
GitHub Repo
No response
Steps to Reproduce
Nx Report
npx nx report
NX Report complete - copy this into the issue template
Node : 20.11.1
OS : darwin-arm64
Native Target : aarch64-macos
npm : 10.2.4
nx : 20.0.0
@nx/js : 20.0.0
@nx/jest : 20.0.0
@nx/eslint : 20.0.0
@nx/workspace : 20.0.0
@nx/devkit : 20.0.0
@nx/eslint-plugin : 20.0.0
@nx/nest : 20.0.0
@nx/next : 20.0.0
@nx/node : 20.0.0
@nx/playwright : 20.0.0
@nx/react : 20.0.0
@nx/vite : 20.0.0
@nx/web : 20.0.0
@nx/webpack : 20.0.0
typescript : 5.5.4
Failure Logs
npx nx migrate --run-migrations --verbose
NX Running 'npm install' to make sure necessary packages are installed
up to date, audited 3011 packages in 6s
393 packages are looking for funding
run
npm fund
for details58 vulnerabilities (3 low, 10 moderate, 45 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run
npm audit
for details.NX Running migrations from 'migrations.json'
Running the following migrations:
Running migration @nx/playwright: 19-6-0-use-serve-static-preview-for-command
Ran 19-6-0-use-serve-static-preview-for-command from @nx/playwright
Use serve-static or preview for webServerCommand.
No changes were made
Running migration @nx/playwright: update-19-6-0-add-e2e-ci-target-defaults
Ran update-19-6-0-add-e2e-ci-target-defaults from @nx/playwright
Add inferred ciTargetNames to targetDefaults with dependsOn to ensure dependent application builds are scheduled before atomized tasks.
No changes were made
Running migration @nx/react: update-19-6-0-turn-module-federation-dts-off
Ran update-19-6-0-turn-module-federation-dts-off from @nx/react
Ensure Module Federation DTS is turned off by default.
No changes were made
Running migration @nx/react: update-module-federation-ssr-server-file
Ran update-module-federation-ssr-server-file from @nx/react
Update the server file for Module Federation SSR port value to be the same as the 'serve' target port value.
No changes were made
Running migration @nx/react: update-19-6-1-ensure-module-federation-target-defaults
Error: ENOENT: no such file or directory, open '/Users/armingerina/Code/someapplication/@nx/react/plugins/webpack'
at Object.openSync (node:fs:581:18)
at readFileSync (node:fs:457:35)
at FsTree.fsReadFile (/Users/armingerina/Code/someapplication/node_modules/nx/src/generators/tree.js:242:43)
at FsTree.read (/Users/armingerina/Code/someapplication/node_modules/nx/src/generators/tree.js:33:32)
at /Users/armingerina/Code/someapplication/node_modules/@nx/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js:13:38
at forEachProjectConfig (/Users/armingerina/Code/someapplication/node_modules/@nx/devkit/src/generators/executor-options-utils.js:35:13)
at forEachExecutorOptions (/Users/armingerina/Code/someapplication/node_modules/@nx/devkit/src/generators/executor-options-utils.js:18:5)
at default_1 (/Users/armingerina/Code/someapplication/node_modules/@nx/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js:8:57)
at runNxMigration (/Users/armingerina/Code/someapplication/node_modules/nx/src/command-line/migrate/migrate.js:1036:11)
at executeMigrations (/Users/armingerina/Code/someapplication/node_modules/nx/src/command-line/migrate/migrate.js:921:39)
NX Failed to run update-19-6-1-ensure-module-federation-target-defaults from @nx/react. This workspace is NOT up to date!
NX Cannot read properties of null (reading 'includes')
TypeError: Cannot read properties of null (reading 'includes')
at /Users/armingerina/Code/someapplication/node_modules/@nx/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js:14:96
at Array.some ()
at /Users/armingerina/Code/someapplication/node_modules/@nx/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js:14:68
at forEachProjectConfig (/Users/armingerina/Code/someapplication/node_modules/@nx/devkit/src/generators/executor-options-utils.js:35:13)
at forEachExecutorOptions (/Users/armingerina/Code/someapplication/node_modules/@nx/devkit/src/generators/executor-options-utils.js:18:5)
at default_1 (/Users/armingerina/Code/someapplication/node_modules/@nx/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js:8:57)
at runNxMigration (/Users/armingerina/Code/someapplication/node_modules/nx/src/command-line/migrate/migrate.js:1036:11)
at executeMigrations (/Users/armingerina/Code/someapplication/node_modules/nx/src/command-line/migrate/migrate.js:921:39)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runMigrations (/Users/armingerina/Code/someapplication/node_modules/nx/src/command-line/migrate/migrate.js:1009:37)
Command failed: npx nx _migrate --run-migrations --verbose
NX Command failed: npx nx migrate --run-migrations --verbose
Error: Command failed: npx nx migrate --run-migrations --verbose
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at runNxSync (/private/var/folders/zz/6s9z09bj4wj_8zvyv132whv00000gn/T/tmp-44777-IBGZ3vSFo7Hr/node_modules/nx/src/utils/child-process.js:28:34)
at runMigrations (/private/var/folders/zz/6s9z09bj4wj_8zvyv132whv00000gn/T/tmp-44777-IBGZ3vSFo7Hr/node_modules/nx/src/command-line/migrate/migrate.js:984:39)
at /private/var/folders/zz/6s9z09bj4wj_8zvyv132whv00000gn/T/tmp-44777-IBGZ3vSFo7Hr/node_modules/nx/src/command-line/migrate/migrate.js:1050:19
at async handleErrors (/private/var/folders/zz/6s9z09bj4wj_8zvyv132whv00000gn/T/tmp-44777-IBGZ3vSFo7Hr/node_modules/nx/src/utils/handle-errors.js:9:24)
Command failed: /var/folders/zz/6s9z09bj4wj_8zvyv132whv00000gn/T/tmp-44777-IBGZ3vSFo7Hr/node_modules/.bin/nx _migrate --run-migrations --verbose
Package Manager Version
10.2.4
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: