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

ng build with ssr enabled does not complete (infinite loop) #27918

Closed
DesignThinkerer opened this issue Jun 25, 2024 · 2 comments
Closed

ng build with ssr enabled does not complete (infinite loop) #27918

DesignThinkerer opened this issue Jun 25, 2024 · 2 comments

Comments

@DesignThinkerer
Copy link

DesignThinkerer commented Jun 25, 2024

Which @angular/* package(s) are the source of the bug?

platform-server

Is this a regression?

Yes

Description

I created a project using ng new and enabled SSR when prompted. However, when I try to build the project, even without making any changes, the build process fails to complete. The issue seems very similar to nrwl/nx#20481

Please provide a link to a minimal reproduction of the bug

https://github.com/DesignThinkerer/ciqual-calculator

Please provide the exception or error you saw

ng build --verbose
\ Building...

  polyfills-6EAL64PA.js  33.4kb

Done in 65ms

  polyfills.server.mjs  262.0kb

\ Building...
● [DEBUG] Lookbehind assertions in regular expressions are not available in the configured target environment ("chrome125.0", "edge124.0", "firefox115.0", "ios16.0", "node22.0.0", "safari16.0" + 5 overrides) [unsupported-regexp]

    node_modules/critters/dist/critters.mjs:1341:51:
      1341 │         const crittersComment = rule.text.match(/^(?<!\! )critters:(.*)/);
           ╵                                                    ~~~

  This regular expression literal has been converted to a "new RegExp()" constructor to avoid
  generating code with a syntax error. However, you will need to include a polyfill for "RegExp" for
  your code to have the correct behavior at run-time.

● [DEBUG] Lookbehind assertions in regular expressions are not available in the configured target environment ("chrome125.0", "edge124.0", "firefox115.0", "ios16.0", "node22.0.0", "safari16.0" + 5 overrides) [unsupported-regexp]

    node_modules/critters/dist/critters.mjs:1399:30:
      1399 │           sel = sel.replace(/(?<!\\)::?[a-z-]+(?![a-z-(])/gi, '').replace(/::?not\(\s...
           ╵                               ~~~

  This regular expression literal has been converted to a "new RegExp()" constructor to avoid
  generating code with a syntax error. However, you will need to include a polyfill for "RegExp" for
  your code to have the correct behavior at run-time.
- Building...
● [DEBUG] This call to "require" will not be bundled because the argument is not a string literal [unsupported-require-call]

    node_modules/express/lib/view.js:72:13:
      72 │     var fn = require(mod).__express;
         ╵              ~~~~~~~
\ Building...

  main-V4TD7P4G.js  211.0kb

\ Building...
● [DEBUG] Indirect calls to "require" will not be bundled [indirect-require]

    node_modules/picocolors/picocolors.js:3:163:
      3 │ ...r") || process.platform === "win32" || require != null && require("tty").isatty(1) &&...
        ╵                                           ~~~~~~~
/ Building...

  server.mjs                 1.1mb
  chunk-T4GESVRS.mjs       511.4kb
  chunk-YFZUPLDY.mjs        18.8kb
  chunk-44PQKHNF.mjs        11.8kb
  chunk-NDYDZJSS.mjs         2.5kb
  render-utils.server.mjs    1.4kb
  main.server.mjs            149b

/ Building...

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 18.0.5
Node: 22.2.0
Package Manager: npm 10.8.1
OS: win32 x64

Angular: 18.0.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1800.5
@angular-devkit/build-angular   18.0.5
@angular-devkit/core            18.0.5
@angular-devkit/schematics      18.0.5
@angular/cli                    18.0.5
@angular/ssr                    18.0.5
@schematics/angular             18.0.5
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.7

Anything else?

No response

@alan-agius4 alan-agius4 transferred this issue from angular/angular Jun 25, 2024
@alan-agius4
Copy link
Collaborator

Duplicate of #27674

@alan-agius4 alan-agius4 marked this as a duplicate of #27674 Jun 25, 2024
@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants