Skip to content

ng build ts error unexpected const #33785

Description

@tiberiuzuld

Command

build

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

22.0.9

Description

X [ERROR] Unexpected "const"

    node_modules/hugerte/hugerte.js:8184:4:
      8184 │     const isContentEditableFalse$6 = isContentEditableFalse$b;
           ╵     ~~~~~


X [ERROR] Unexpected "const"

    node_modules/hugerte/themes/silver/theme.js:1551:4:
      1551 │     const fold$1 = (res, onError, onValue) => res.stype === Simp...

ng build error above with @angular/cli v22.1.0 and latest v22.1.3 and no error with v22.0.9

Minimal Reproduction

  1. Clone https://github.com/tiberiuzuld/repro-app-ts-error
  2. run ng build
  3. Observe error
  4. Change package.json @angular/build & @angular/cli to version 22.0.9
  5. run ng build
  6. Observe no error

Exception or Error


Your Environment

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


Angular CLI       : 22.1.0
Angular           : 22.1.0
Node.js           : 24.19.0
Package Manager   : npm 12.0.2
Operating System  : win32 x64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 22.1.0            │ 22.1.0            │
│ @angular/cli              │ 22.1.0            │ 22.1.0            │
│ @angular/common           │ 22.1.0            │ 22.1.0            │
│ @angular/compiler         │ 22.1.0            │ 22.1.0            │
│ @angular/compiler-cli     │ 22.1.0            │ 22.1.0            │
│ @angular/core             │ 22.1.0            │ 22.1.0            │
│ @angular/forms            │ 22.1.0            │ 22.1.0            │
│ @angular/platform-browser │ 22.1.0            │ 22.1.0            │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 6.0.3             │ ~6.0.2            │

Anything else relevant?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions