Skip to content
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

"serve-static" target leads to endless loop in angular application #26938

Closed
1 of 4 tasks
JonasLuechau opened this issue Jul 15, 2024 · 2 comments
Closed
1 of 4 tasks
Assignees
Labels
blocked: retry with latest Retry with latest release or head. scope: angular Issues related to Angular support in Nx stale type: bug

Comments

@JonasLuechau
Copy link

Current Behavior

I'm trying to use a cached build, serve it and use it with Cypress, but the "serve-static" target/the @nx/web:file-server executor leads to an endless loop where NX builds the app again and again. If I use the underlying http-server package directly I can serve the build without problems.

Expected Behavior

The executor shoud just serve the app after building the app once.

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace@latest
  2. Choose angular, integrated monorepo, webpack as bundler, scss, no prerendering, cypress and gitlab
  3. In your new workspace use "npx nx run [your project]:serve-static"
  4. It will run into an endless loop and build the app over and over (while reading from cache)

Nx Report

Node   : 20.11.1
OS     : darwin-arm64
npm    : 10.2.4

nx (global)        : 18.2.4
nx                 : 19.4.3
@nx/js             : 19.4.3
@nx/jest           : 19.4.3
@nx/linter         : 19.4.3
@nx/eslint         : 19.4.3
@nx/workspace      : 19.4.3
@nx/angular        : 19.4.3
@nx/cypress        : 19.4.3
@nx/devkit         : 19.4.3
@nx/eslint-plugin  : 19.4.3
@nrwl/tao          : 19.4.3
@nx/web            : 19.4.3
@nx/webpack        : 19.4.3
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/cypress/plugin
@nx/eslint/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@FrozenPandaz FrozenPandaz added the scope: angular Issues related to Angular support in Nx label Jul 16, 2024
@Coly010 Coly010 added the blocked: retry with latest Retry with latest release or head. label Jul 18, 2024
@Coly010
Copy link
Contributor

Coly010 commented Jul 18, 2024

I can't reproduce this on Nx 19.5.0 (just released).

Can you try again with that?

Copy link

This issue has been automatically marked as stale because no results of retrying on the latest version of Nx was provided within 7 days.
It will be closed in 21 days if no results are provided.
If the issue is still present, please reply to keep it active.
If the issue was not present, please close this issue.
Thanks for being a part of the Nx community! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: retry with latest Retry with latest release or head. scope: angular Issues related to Angular support in Nx stale type: bug
Projects
None yet
Development

No branches or pull requests

3 participants