nx icon indicating copy to clipboard operation
nx copied to clipboard

"Build target failed" on remote with Nx 19.2.0

Open rbirkgit opened this issue 1 year ago • 5 comments
trafficstars

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

  • [ ] macOS
  • [ ] Linux
  • [X] Windows
  • [ ] Other (Please specify)

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.

rbirkgit avatar Jun 05 '24 22:06 rbirkgit

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

Coly010 avatar Jun 07 '24 13:06 Coly010

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] avatar Jun 15 '24 00:06 github-actions[bot]

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 avatar Jun 17 '24 12:06 rbirkgit

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.

rbirkgit avatar Jun 17 '24 17:06 rbirkgit

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] avatar Jun 26 '24 00:06 github-actions[bot]

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.

github-actions[bot] avatar Aug 17 '24 00:08 github-actions[bot]