Open
Description
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