Closed rcrx closed 5 years ago
Does forcing the platform to be Linux rather than Android help?
npm install --platform=linux sharp
All there was to it.
Does forcing the platform to be Linux rather than Android help?
npm install --platform=linux sharp
This let me install node_modules but when I'm trying to execute its checking for the platform and throwing an error due to platform mismatch
/root/devdas/node_modules/venom-bot/node_modules/sharp/lib/libvips.js:62
throw new Error(`'${vendorPlatformId}' binaries cannot be used on the '${currentPlatformId}' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the '${currentPlatformId}' platform.`);
^
Error: 'linux-arm64v8' binaries cannot be used on the 'android-arm64v8' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'android-arm64v8' platform.
at Object.hasVendoredLibvips (/root/devdas/node_modules/venom-bot/node_modules/sharp/lib/libvips.js:62:13)
at Object.<anonymous> (/root/devdas/node_modules/venom-bot/node_modules/sharp/lib/constructor.js:7:22)
Hello ! Please try this option add package pkg install libvips npm i
Also you can try to install ubuntu 20 and install v packages
Does forcing the platform to be Linux rather than Android help?
npm install --platform=linux sharp
I get an even bigger error with that command.
npm error code 1
npm error git dep preparation failed
npm error command /data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/usr/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/data/data/com.termux/files/home/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm error > sharp@0.30.7 install
npm error > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm error
npm error sharp: Detected globally-installed libvips v8.15.2
npm error sharp: Building from source via node-gyp
npm error npm warn using --force Recommended protections disabled.
npm error npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm error npm warn deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm error npm warn deprecated domexception@2.0.1: Use your platform's native DOMException instead
npm error npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm error npm warn deprecated vm2@3.9.19: The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migrating your code to isolated-vm.
npm error npm warn deprecated phin@2.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm error npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm error npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm error npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm error npm warn deprecated @humanwhocodes/config-array@0.11.10: Use @eslint/config-array instead
npm error npm warn deprecated @humanwhocodes/object-schema@1.2.1: Use @eslint/object-schema instead
npm error 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 error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@22.2.0 | android | arm64
npm error gyp info find Python using Python version 3.11.9 found at "/data/data/com.termux/files/usr/bin/python3"
npm error gyp http GET https://nodejs.org/download/release/v22.2.0/node-v22.2.0-headers.tar.gz
npm error gyp http 200 https://nodejs.org/download/release/v22.2.0/node-v22.2.0-headers.tar.gz
npm error gyp http GET https://nodejs.org/download/release/v22.2.0/SHASUMS256.txt
npm error gyp http 200 https://nodejs.org/download/release/v22.2.0/SHASUMS256.txt
npm error gyp info spawn /data/data/com.termux/files/usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/data/data/com.termux/files/home/.npm/_cacache/tmp/git-clonePQM76s6fE6PX/node_modules/sharp/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/data/data/com.termux/files/home/.cache/node-gyp/22.2.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/data/data/com.termux/files/home/.cache/node-gyp/22.2.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/data/data/com.termux/files/home/.cache/node-gyp/22.2.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/data/data/com.termux/files/home/.npm/_cacache/tmp/git-clonePQM76s6fE6PX/node_modules/sharp',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error Package xproto was not found in the pkg-config search path.
npm error Perhaps you should add the directory containing xproto.pc' npm error to the PKG_CONFIG_PATH environment variable npm error Package 'xproto', required by 'xrender', not found npm error gyp: Undefined variable android_ndk_path in binding.gyp while trying to load binding.gyp npm error gyp ERR! configure error npm error gyp ERR! stack Error:
gyp` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.
@weskerty Please upgrade to the latest version. If you still require help please open a new installation issue and answer all of the questions.
Here's the terminal output:
Any suggestions of how to resolve this would be appreciated.