-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Problem description
There is a regression or a race condition where running npm commands intermittently fails to pass arguments to the Node binary, resulting in the Node.js REPL opening instead of the command executing.
In the provided screenshot, the exact same command (npm install corepack -g) was run four times in a row.
-
The 1st and 4th attempts succeeded.
-
The 2nd and 3rd attempts ignored the arguments and opened Node.js v25.3.0
What steps will reproduce the bug?
-
Install nodejs:
pkg install nodejs -
Run npm install corepack -g multiple times.
-
Observe that on some attempts, the arguments are ignored and the
Node.js >prompt appears. -
Note that other commands like
npm -vandnpm ls -gdo not seem to trigger this behavior as frequently or at all.
What is the expected behavior?
The npm script should consistently pass arguments to node and execute the intended command every time.
System information
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__APK_FILE=/data/app/~~ZY72fZu4xC06umBuBx3UMw==/com.termux-eQqI3vv_v_EUAlVbrud0sw==/base.apk
TERMUX_APP__APK_RELEASE=GITHUB
TERMUX_APP__APP_VERSION_CODE=1022
TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.3
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__IS_DEBUGGABLE_BUILD=true
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__LEGACY_DATA_DIR=/data/data/com.termux
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PID=18956
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c94,c257,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__TARGET_SDK=28
TERMUX_VERSION=0.119.0-beta.3
TERMUX__APPS_DIR=/data/user/0/com.termux/termux/apps
TERMUX__HOME=/data/data/com.termux/files/home
TERMUX__PREFIX=/data/data/com.termux/files/usr
TERMUX__ROOTFS_DIR=/data/data/com.termux/files
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c94,c257,c512,c768
TERMUX__UID=10350
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
Updatable packages:
command-not-found/stable 3.2-15 aarch64 [upgradable from: 3.2-14]
termux-tools version:
1.45.0
Android version:
13
Kernel build information:
Linux localhost 4.14.190-perf-g7da93debc0ee #1 SMP PREEMPT Tue Nov 21 06:37:52 UTC 2023 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
M2101K6G
Supported ABIs:
SUPPORTED_ABIS: arm64-v8a,armeabi-v7a,armeabi
SUPPORTED_32_BIT_ABIS: armeabi-v7a,armeabi
SUPPORTED_64_BIT_ABIS: arm64-v8a
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so