termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.98k stars 2.98k forks source link

[Bug]: Unable to create new react project with npx #21150

Open mangeleptico opened 4 weeks ago

mangeleptico commented 4 weeks ago

Problem description

I want to install a develop environment with react, but when i try to create a basic React project, this error appears. nodejs version: 20.15.1 npm version: 10.7.0

i'll appreciate any answer.

What steps will reproduce the bug?

➜ npx create-react-app my-new-awesome-app

Creating a new React app in /data/data/com.termux/files/home/DEV/React/my-new-awesome-app.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

core-js@3.38.0 postinstall node -e "try{require('./postinstall')}catch(e){}"

core-js-pure@3.38.0 postinstall node -e "try{require('./postinstall')}catch(e){}"

added 1480 packages in 1m

261 packages are looking for funding run npm fund for details error: expected absolute path: "-e"

Aborting installation. node has failed.

Deleting generated file... node_modules Deleting generated file... package.json Done.

What is the expected behavior?

No response

System information

Termux Variables:
TERMUX_EXEC__PROC_SELF_EXE=/data/data/com.termux/files/usr/bin/termux-info
TERMUX_VERSION=googleplay.2024.07.07
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.net stable main
Updatable packages:
All packages up to date
termux-tools version:
3.0.7
Android version:
14
Kernel build information:
Linux localhost 5.15.123-android13-3-28577532 #1 SMP PREEMPT Mon May 20 15:39:10 +07 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-X510
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
asinglebit commented 1 week ago

Same issue here

[4/4] Building fresh packages... [1/2] ⠂ core-js error /data/data/com.termux/files/home/storage/projects/game/node_modules/core-js: Command failed. Exit code: 1 Command: node -e "try{require('./postinstall')}catch(e){}" Arguments: Directory: /data/data/com.termux/files/home/storage/projects/game/node_modules/core-js Output: error: expected absolute path: "-e"