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

Error message still is wrong #28904

Open
1 task
Gouvernathor opened this issue Nov 20, 2024 · 0 comments
Open
1 task

Error message still is wrong #28904

Gouvernathor opened this issue Nov 20, 2024 · 0 comments
Labels
area: @angular/build freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix

Comments

@Gouvernathor
Copy link

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

As stated in the other issues, the error message indicates that there is an incompatibility with browser version constraints, mentioning a "target environment" and listing browser versions. But the actual reason (a bug in zone.js) has nothing to do with browser constraints.
In case your goal is not to make devs lose many days trying to remove browser constraints that aren't there, this should be fixed.

Minimal Reproduction

import languageIds from '../assets/langages.json';
export {languageIds};
const translations: Readonly<Record<string, Readonly<Record<string, string>>>> = Object.fromEntries(await Promise.all(
    languageIds.map(async (languageId) => (
        [languageId, await import(`../assets/languages/${languageId}.json`)]
))));

With the required JSON files, followed by ng serve or ng build.

Exception or Error

X [ERROR] Top-level await is not available in the configured target environment ("chrome129.0", "edge129.0", "firefox115.0", "ios17.0", "node22.0.0", "safari17.0" + 5 overrides)

    src/configuration.ts:5:40:
      5 │ ...slations = Object.fromEntries(await Promise.all(languageIds.map(...
        ╵                                  ~~~~~

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 18.2.12
Node: 20.18.0
Package Manager: npm 10.9.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.12
@angular-devkit/build-angular   18.2.12
@angular-devkit/core            18.2.12
@angular-devkit/schematics      18.2.12
@schematics/angular             18.2.12
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10

Anything else relevant?

No response

@alan-agius4 alan-agius4 added area: @angular/build type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity1: confusing labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular/build freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix
Projects
None yet
Development

No branches or pull requests

2 participants