termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
31.28k stars 3.32k forks source link

[Bug]: npm install #3930

Open a1232580 opened 2 weeks ago

a1232580 commented 2 weeks ago

Problem description

~/RSSHub $ npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated ts-custom-error@2.2.2: npm package tarball contains useless codeclimate-reporter binary, please update to version 3.1.1. See https://github.com/adriengibrat/ts-custom-error/issues/32 npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. [##################] - reify:googleapis: timing reifyNode:node_modules

bufferutil@4.0.8 install node-gyp-build gyp info it worked if it ends with okis: timing reifyNode:node_modules gyp info using node-gyp@10.0.1 gyp info using node@20.11.1 | android | arm64 gyp info find Python using Python version 3.11.8 found at "/data/data/com.termux/files/usr/bin/python3" [##################] | reify:googleapis: timing reifyNode:node_modules gyp info spawn /data/data/com.termux/files/usr/bin/python3node_modules gyp info spawn args [ gyp info spawn args '/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/data/data/com.termux/files/home/RSSHub/node_modules/bufferutil/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/data/data/com.termux/files/home/.cache/node-gyp/20.11.1/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/data/data/com.termux/files/home/.cache/node-gyp/20.11.1', gyp info spawn args '-Dnode_gyp_dir=/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/data/data/com.termux/files/home/.cache/node-gyp/20.11.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/data/data/com.termux/files/home/RSSHub/node_modules/bufferutil', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp: Undefined variable android_ndk_path in binding.gyp while trying to load binding.gyp gyp ERR! configure error ify:googleapis: timing reifyNode:node_modules gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess. (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:271:18) gyp ERR! stack at ChildProcess.emit (node:events:518:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) gyp ERR! System Linux 4.14.117-perf-gd2e118d gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /data/data/com.termux/files/home/RSSHub/node_modules/bufferutil gyp ERR! node -v v20.11.1 gyp ERR! node-gyp -v v10.0.1 gyp ERR! not ok npm ERR! code 1 npm ERR! path /data/data/com.termux/files/home/RSSHub/node_modules/bufferutil npm ERR! command failed npm ERR! command sh -c node-gyp-build npm ERR! A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2024-04-23T02_09_28_125Z-debug-0.log

Steps to reproduce the behavior.

npm install

What is the expected behavior?

npm install

System information

aarch64 Linux ~ $ python --version Python3.11.8 nodev20.11.1

twaik commented 2 weeks ago

I am pretty much sure the problem is related to #3858 and the solution will fit here.