Skip to content

Spurious (intermittent) compile errors in build-frontend step #24071

@enver-haase

Description

@enver-haase

Description of the bug

The build system seems to be fine with a broken / old 'tsc' on the $PATH, even if a local tsc is installed.

Analysis:
Someone ran npm install -g typescript (or sudo npm install -g typescript) at some point — dated March 31, 2021 based on the symlink timestamp. That's a system-wide Node.js/npm installation under /usr/local.

This was too old. I got errors saying e.g. that 'es2023' as a target was not known.

npm uninstall -g typescript --prefix /usr/local

helped.

After a fresh boot, compile once worked. Then the problem would go away, until you delete the production bundle. I am guessing only after some use (shell, ...) the PATH with the broken tsc on it was added, so that this problem was hard to track down.

Expected behavior

Build system should prefer local installation at all times, as this is the one known to be good.

Minimal reproducible example

(do not have one)
I may have a sister laptop with a similarly broken installation to reproduce. If I do, I will post the error printouts here for reference.

Versions

  • Vaadin / Flow version: 21.1.1
  • Java version: 25
  • OS version: macOS 26.4
  • Browser version (if applicable):
  • Application Server (if applicable):
  • IDE (if applicable):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Inbox (needs triage)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions