Provided NodeJS package handles key events wrong

Hello,

Requirements:

I have Searched the forum for my issue and found nothing related or helpful
I have checked the Resources category (Resources Index)
I have reviewed the Wiki for relevant information
I have read the the Release Notes and Errata

OpenMandriva Lx version:

OpenMandriva Lx release 25.12 (ROME) Rolling for x86_64

Desktop environment (KDE, LXQT…):

i3

Description of the issue (screenshots if relevant):

When executing any CLI command using nodejs (including simply node), the arrow keys and the enter Key print ANSI characters and newline instead of navigating and executing an action. This is a real issue for interactive node-based commands such as npx create …whatever… since one can literally not select any option.

Dowloading node from the official repo solves this problem - for example using curl -fsSL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s 24

According to chatgpt (take it with grain of salt of course): “this is related to how node was built, packaged or interacting with your terminal”.

Further info:

process.stdin.isTTY gave true

$TERM was xterm-256color

ldd $(which node) did NOT mention libtinfo nor libncurses (according to chatgpt, it should - but the version that actually works does not mention these either so perhaps this point is not that relevant?).

Wrapping the command with rlwrap did not work. The arrow keys stopped to print the weird ANSI characters, but they also did nothing. And hitting Enter also had no effect.

Relevant informations (hardware involved, software version, logs or output…):

ASUS laptop, node version 24

Out of scope for Support, moved to Development