You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation said that: "This option is useful for when the host application is using a remote that does not live in the same workspace as the host".
But when I run projects using the angular module-federation-dev-server, skipRemotes now only can detect projects that are in same workspace. If the projects are in a different repository and are not running (which is my use-case and is also other's use-case as well I'm sure), it won't be able to find them.
I found thí similar issue and this bug was marked as fixed from Nx 16.
Expected Behavior
Specifying projects in skipRemotes that are not in the same repository should work perfectly fine.
GitHub Repo
No response
Steps to Reproduce
Generate a Dynamic Host application as instructed.
Add a reference to the remote application by declaring in assets/module-federation.manifest.json file.
Start the host without starting the remote, using the skipRemotes input with the remote's project name.
> nx run shell:serve:development --open
NX Starting module federation dev-server for shell with 2 remotes
NX Cannot read properties of undefined (reading 'data')
TypeError: Cannot read properties of undefined (reading 'data')
at D:\poc\node_modules\@nx\webpack\src\utils\module-federation\get-remotes-for-host.js:61:112
at Array.map (<anonymous>)
at getRemotes (D:\poc\node_modules\@nx\webpack\src\utils\module-federation\get-remotes-for-host.js:61:71)
at moduleFederationDevServerExecutor (D:\poc\node_modules\@nx\angular\src\executors\module-federation-dev-server\module-federation-dev-server.impl.js:55:56)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at getLastValueFromAsyncIterableIterator (D:\poc\node_modules\nx\src\utils\async-iterator.js:15:19)
at iteratorToProcessStatusCode (D:\poc\node_modules\nx\src\command-line\run\run.js:44:29)
at handleErrors (D:\poc\node_modules\nx\src\utils\params.js:10:16)
at process.<anonymous> (D:\poc\node_modules\nx\bin\run-executor.js:59:28)
NX Running target serve for project shell failed
Failed tasks:
- shell:serve:development
Hint: run the command with --verbose for more details.
Package Manager Version
10.1.0
Operating System
macOS
Linux
Windows
Other (Please specify)
Additional Information
No response
The text was updated successfully, but these errors were encountered:
The executor will now automatically skip remotes that are not listed in the workspace. The --skipRemotes option should now only be used to skip remotes that are in the workspace.
<!-- 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` -->
## Current Behavior
<!-- This is the behavior we have today -->
Remotes not in the workspace are now skipped automatically. The
`--skipRemotes` option is now used to intentionally skip remotes in the
workspace that are served by other means
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes#23574
Current Behavior
The documentation said that: "This option is useful for when the host application is using a remote that does not live in the same workspace as the host".
But when I run projects using the angular module-federation-dev-server, skipRemotes now only can detect projects that are in same workspace. If the projects are in a different repository and are not running (which is my use-case and is also other's use-case as well I'm sure), it won't be able to find them.
I found thí similar issue and this bug was marked as fixed from Nx 16.
Expected Behavior
Specifying projects in skipRemotes that are not in the same repository should work perfectly fine.
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
10.1.0
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: