termux / termux-packages

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

npm dependency installation error #19699

Closed 021Bedy closed 1 week ago

021Bedy commented 6 months ago

After using the npm i command, I receive this error message:

Error log

``` └─[Moderacao-Discord]-} npm i npm WARN deprecated phin@2.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated isgd@1.1.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead 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 axios@0.20.0: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 [##################] / reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete > canvas@2.11.2 install > node-pre-gyp install --fallback-to-build --update-binary node-pre-gyp info it worked if it ends with okifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete node-pre-gyp info using node-pre-gyp@1.0.11 node-pre-gyp info using node@20.11.1 | android | arm64 node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-android-unknown-arm64.tar.gz node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-android-unknown-arm64.tar.gz node-pre-gyp WARN Pre-built binaries not installable for canvas@2.11.2 and node@20.11.1 (node-v115 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-android-unknown-arm64.tar.gz gyp info it worked if it ends with oktiming reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete gyp info using node-gyp@10.0.1 gyp info using node@20.11.1 | android | arm64 gyp info ok #######] - reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete gyp info it worked if it ends with oktiming reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete 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"te [##################] - reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete gyp info spawn /data/data/com.termux/files/usr/bin/python3_modules/@napi-rs/canvas-android-arm64 Complete 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/tst/Moderacao-Discord/node_modules/canvas/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/tst/Moderacao-Discord/node_modules/canvas', 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 ] Using overrides found in /data/data/com.termux/files/home/.gyp/include.gypi/canvas-android-arm64 Complete gyp info ok #######] - reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete gyp info it worked if it ends with oktiming reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete gyp info using node-gyp@10.0.1athjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete gyp info using node@20.11.1 | android | arm64 gyp info spawn make] - reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory '/data/data/com.termux/files/home/tst/Moderacao-Discord/node_modules/canvas/build' SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node COPY Release/canvas-postbuild.node timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/backend/Backend.odules/@napi-rs/canvas-android-arm64 Complete In file included from ../src/backend/Backend.cc:1:ode:node_modules/@napi-rs/canvas-android-arm64 Complete ../src/backend/Backend.h:60:14: warning: private field 'backend' is not used [-Wunused-private-field] 60 | Backend* backend; | ^ 1 warning generated. - reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/backend/ImageBackend.o/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/backend/PdfBackend.oes/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/backend/SvgBackend.oes/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/bmp/BMPParser.omodules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/Backends.onode_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/Canvas.oe:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/CanvasGradient.oodules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/CanvasPattern.omodules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.opi-rs/canvas-android-arm64 Complete ../src/CanvasRenderingContext2d.cc:2500:11: warning: enumeration values 'TEXT_ALIGNMENT_START' and 'TEXT_ALIGNMENT_LEFT' not handled in switch [-Wswitch] 2500 | switch (state->textAlignment) { | ^~~~~~~~~~~~~~~~~~~~ 1 warning generated. - reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/closure.o:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/color.ode:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/Image.ode:node_modules/@napi-rs/canvas-android-arm64 Complete ../src/Image.cc:1196:3: warning: 'rsvg_handle_get_dimensions' is deprecated: Use 'rsvg_handle_get_intrinsic_size_in_pixels' instead [-Wdeprecated-declarations] 1196 | rsvg_handle_get_dimensions(_rsvg, dims); | ^ /data/data/com.termux/files/usr/include/librsvg-2.0/librsvg/rsvg.h:707:1: note: 'rsvg_handle_get_dimensions' has been explicitly marked deprecated here 707 | RSVG_DEPRECATED_FOR(rsvg_handle_get_intrinsic_size_in_pixels) | ^ /data/data/com.termux/files/usr/include/librsvg-2.0/librsvg/rsvg.h:50:32: note: expanded from macro 'RSVG_DEPRECATED_FOR' 50 | #define RSVG_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) RSVG_API | ^ /data/data/com.termux/files/usr/include/glib-2.0/glib/gmacros.h:1273:44: note: expanded from macro 'G_DEPRECATED_FOR' 1273 | #define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) | ^ ../src/Image.cc:1235:24: warning: 'rsvg_handle_render_cairo' is deprecated: Use 'rsvg_handle_render_document' instead [-Wdeprecated-declarations] 1235 | gboolean render_ok = rsvg_handle_render_cairo(_rsvg, cr); | ^ /data/data/com.termux/files/usr/include/librsvg-2.0/librsvg/rsvg-cairo.h:89:1: note: 'rsvg_handle_render_cairo' has been explicitly marked deprecated here 89 | RSVG_DEPRECATED_FOR(rsvg_handle_render_document) | ^ /data/data/com.termux/files/usr/include/librsvg-2.0/librsvg/rsvg.h:50:32: note: expanded from macro 'RSVG_DEPRECATED_FOR' 50 | #define RSVG_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) RSVG_API | ^ /data/data/com.termux/files/usr/include/glib-2.0/glib/gmacros.h:1273:44: note: expanded from macro 'G_DEPRECATED_FOR' 1273 | #define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) | ^ 2 warnings generated.- reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/ImageData.oode_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/init.oode:node_modules/@napi-rs/canvas-android-arm64 Complete CXX(target) Release/obj.target/canvas/src/register_font.omodules/@napi-rs/canvas-android-arm64 Complete SOLINK_MODULE(target) Release/obj.target/canvas.nodenode_modules/@napi-rs/canvas-android-arm64 Complete COPY Release/canvas.nodefy:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete make: Leaving directory '/data/data/com.termux/files/home/tst/Moderacao-Discord/node_modules/canvas/build' gyp info ok node-pre-gyp info ok - reify:mathjs: timing reifyNode:node_modules/@napi-rs/canvas-android-arm64 Complete > ffmpeg-static@5.2.0 install > node install.js ffmpeg-static install failed: No binary found for architectureules/@napi-rs/canvas-android-arm64 Complete npm ERR! code 1 npm ERR! path /data/data/com.termux/files/home/tst/Moderacao-Discord/node_modules/ffmpeg-static npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2024-04-08T01_36_19_488Z-debug-0.log ``` here is the package.json ``` { "name": "discordbot", "version": "10.0.0", "description": "Discord Bot is a bot with which you can run your entire server! With no less than 400+ commands", "main": "./src/index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node . --trace-warnings", "add-dev": "node src/dev.js" }, "keywords": [ "Music", "Moderation", "Tickets", "Radio", "Games", "Giveaways", "Customisation", "Economy", "Leveling", "Invites", "Messages", "Utilities", "Suggestions", "Server Stats" ], "author": "CorwinDev", "license": "ISC", "dependencies": { "@discordjs/voice": "^0.16.0", "@haileybot/captcha-generator": "^1.7.0", "@iamtraction/google-translate": "^2.0.1", "@top-gg/sdk": "^3.1.3", "axios": "^1.2.2", "canvacord": "^5.4.8", "chalk": "^4.1.2", "discord-giveaways": "^6.0.1", "discord-image-generation": "^1.4.23", "discord.js": "^14.8.0", "dompurify": "^3.0.1", "dotenv": "^16.0.3", "erela.js": "^2.4.0", "erela.js-apple": "^1.2.6", "erela.js-deezer": "^1.0.7", "erela.js-facebook": "^1.0.4", "erela.js-spotify": "^1.2.0", "ffmpeg-static": "^5.1.0", "figlet": "^1.5.2", "fs": "^0.0.1-security", "generate-password": "^1.7.0", "giphy-api": "^2.0.2", "he": "^1.2.0", "html-entities": "^2.3.3", "i": "^0.3.7", "is-hexcolor": "^1.0.0", "isgd": "^1.1.3", "jsdom": "^21.1.0", "libsodium-wrappers": "^0.7.10", "lyrics-finder": "^21.7.0", "mathjs": "^11.5.0", "moment": "^2.29.4", "moment-duration-format": "^2.3.2", "moment-timezone": "^0.5.39", "mongoose": "^6.8.0", "ms": "^2.1.3", "node-fetch": "^2.6.6", "parse-ms": "^2.1.0", "popcat-wrapper": "^1.5.4", "sourcebin": "^5.0.0", "topgg-autoposter": "^2.0.1", "util": "^0.12.5", "weather-js": "^2.0.0", "ytdl-core": "^4.11.2" } } ```

twaik commented 1 week ago

As far as I can understand npm can not install some subdependency because it lacks binaries for termux. You can try to build this dependency manually and after this start again. There is nothing we can help with if it will not work.