nrwl / nx

Smart Monorepos ยท Fast CI
https://nx.dev
MIT License
23.51k stars 2.34k forks source link

"Build target failed" on remote with Nx 19.2.0 #26398

Closed rbirkgit closed 3 months ago

rbirkgit commented 4 months ago

Current Behavior

I run the following in our application:

nx run cloud-ui:serve:development --verbose

It has three remotes. When trying to serve them statically, I get an error with Nx 19.2.0

 NX  Starting module federation dev-server for cloud-ui with 3 remotes
Connecting on localhost:4201
Connecting on localhost:4202
Connecting on localhost:4205
 NX   Build target failed: deployment:build:development
Error: Build target failed: deployment:build:development
    at run (D:\Git\cloud-ui\node_modules\@nx\web\src\executors\file-server\file-server.impl.js:138:27)
    at fileServerExecutor (D:\Git\cloud-ui\node_modules\@nx\web\src\executors\file-server\file-server.impl.js:151:9)
    at fileServerExecutor.next (<anonymous>)
    at f (D:\Git\cloud-ui\node_modules\@nx\devkit\src\utils\async-iterable\map-async-iteratable.js:9:35)
    at f.next (<anonymous>)
    at mapAsyncIterable (D:\Git\cloud-ui\node_modules\@nx\devkit\src\utils\async-iterable\map-async-iteratable.js:16:19)
    at mapAsyncIterable.next (<anonymous>)
    at D:\Git\cloud-ui\node_modules\@nx\devkit\src\utils\async-iterable\combine-async-iterables.js:50:50
    at D:\Git\cloud-ui\node_modules\@nx\devkit\src\utils\async-iterable\combine-async-iterables.js:27:75
    at Array.map (<anonymous>)

Expected Behavior

It should serve remote without errors.

GitHub Repo

No response

Steps to Reproduce

  1. See description above

Nx Report

Node   : 20.13.0
OS     : win32-x64
yarn   : 4.2.2

nx                 : 19.2.0
@nx/js             : 19.2.0
@nx/linter         : 19.2.0
@nx/eslint         : 19.2.0
@nx/workspace      : 19.2.0
@nx/angular        : 19.2.0
@nx/devkit         : 19.2.0
@nx/eslint-plugin  : 19.2.0
@nrwl/tao          : 19.2.0
@nx/web            : 19.2.0
@nx/webpack        : 19.2.0
typescript         : 5.4.5
---------------------------------------
Community plugins:
ng-mocks : 14.12.2

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

Get same error, whichever remote it starts with first. It was working with earlier versions of Nx.

Building the remote separately in command line works fine both in prod and development configuration.

Coly010 commented 4 months ago

Hey! A reproduction repo would be great so that we can investigate this for you :)

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because no reproduction was provided within 7 days. Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue. Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues. This issue will be closed in 21 days if a reproduction is not provided. If a reproduction has been provided, please reply to keep it active. Thanks for being a part of the Nx community! ๐Ÿ™

rbirkgit commented 4 months ago

It seems the issue only occurs on my windows env. Same repo works from ubuntu. This makes it hard to share the repo.

I was hoping for some ideas what could be the issue? What it tries doing at this part of the code?

rbirkgit commented 4 months ago

I updated to 19.2.2, rebooted and was away for the weekend. Not sure why it works today. It has been broken for some time.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because no reproduction was provided within 7 days. Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue. Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues. This issue will be closed in 21 days if a reproduction is not provided. If a reproduction has been provided, please reply to keep it active. Thanks for being a part of the Nx community! ๐Ÿ™

github-actions[bot] commented 2 months ago

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.