nextcloud / recognize

👁 👂 Smart media tagging for Nextcloud: recognizes faces, objects, landscapes, music genres
https://apps.nextcloud.com/apps/recognize
GNU Affero General Public License v3.0
536 stars 43 forks source link

npm ci command fails Error: Unsupported platform: freebsd #739

Closed florisdipt closed 1 year ago

florisdipt commented 1 year ago

Which version of recognize are you using?

3.6.3

Enabled Modes

Face recognition

TensorFlow mode

Normal mode

Which Nextcloud version do you have installed?

Nextcloud Hub 3 (25.0.4)

Which Operating system do you have installed?

TrueNAS core Nextcloud plugin(in freeBSD jail)

Which Docker container are you using to run Nextcloud? (if applicable)

none

How much RAM does your server have?

8

What processor Architecture does your CPU have?

x64

Describe the Bug

After following the steps on manual install npm ci fails saying.

npm ERR! /usr/local/www/nextcloud/apps/recognize/node_modules/@tensorflow/tfjs-node/scripts/deps-constants.js:86 npm ERR! throw new Error('Unsupported platform: ' + os.platform()); npm ERR! ^ npm ERR! npm ERR! Error: Unsupported platform: freebsd

There are other errors that complain about the npm version(it is major 9) but this is the main one that concerns me as freeBSD appears to only have major 9 for node 14.

Expected Behavior

npm ci to pull all packages that apply to the package-lock.json

To Reproduce

  1. Install TrueNAS core
  2. Install Nextcloud via Plugin
  3. Install this Nextcloud plugin

Debug log

e following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED: bash: 5.2.15 neofetch: 7.1.0_1

Number of packages to be installed: 2

The process will require 10 MiB more space. 2 MiB to be downloaded.

Proceed with this action? [y/N]: y [Nextcloud] [1/2] Fetching bash-5.2.15.pkg: 100% 2 MiB 1.7MB/s 00:01 [Nextcloud] [2/2] Fetching neofetch-7.1.0_1.pkg: 100% 79 KiB 81.0kB/s 00:01 Checking integrity... done (0 conflicting) [Nextcloud] [1/2] Installing bash-5.2.15... [Nextcloud] [1/2] Extracting bash-5.2.15: 100% [Nextcloud] [2/2] Installing neofetch-7.1.0_1... [Nextcloud] [2/2] Extracting neofetch-7.1.0_1: 100% root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # neofetch ` root@Nextcloud ` `.....---.......--. -/ -------------- +o .--/y: +. OS: FreeBSD 13.1-RELEASE-p7 amd64 yo:. :o+- Uptime: 23 mins y/ -/-o/ Packages: 196 (pkg) .- ::/sy+:. Shell: csh tcsh 6.22.04 /-- / Terminal: /dev/pts/0 : : CPU: Common KVM (4) @ 3.191GHz : : Memory: 4903MiB / 7948MiB / / .- -. -- -. : : .-- `--. .---.....----.

root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # cat package.json { "name": "recognize", "version": "3.6.3", "description": "Image recognition in nextcloud", "main": "src/classifier_imagenet.js", "directories": { "lib": "lib", "test": "tests" }, "scripts": { "build": "NODE_ENV=production webpack --progress --config webpack.js", "dev": "NODE_ENV=development webpack --progress --config webpack.js", "watch": "NODE_ENV=development webpack --progress --watch --config webpack.js", "lint": "eslint --ext .js,.vue src", "lint:fix": "eslint --ext .js,.vue src --fix", "stylelint": "stylelint src", "stylelint:fix": "stylelint src --fix", "build:translatables": "node scripts/generate-translatable-file.js > src/things.js" }, "repository": { "type": "git", "url": "github.com/marcelklehr/recognize" }, "author": "Marcel Klehr mklehr@gmx.net", "license": "MIT", "dependencies": { "@exifer/gps": "^1.0.0-beta.2", "@tensorflow/tfjs": "^4.2.0", "@tensorflow/tfjs-backend-wasm": "^4.2.0", "@tensorflow/tfjs-node": "^4.2.0", "@tensorflow/tfjs-node-gpu": "^4.2.0", "@vladmandic/face-api": "^1.7.7", "download": "^8.0.0", "execa": "^5.1.1", "exifer": "^1.0.0-beta.2", "ffmpeg-static": "^4.4.0", "geo-reverse": "^1.0.13", "get-port": "^5.1.1", "get-stdin": "^9.0.0", "humanize-duration": "^3.27.3", "jimp": "^0.22.7", "lodash": "^4.17.21", "static-server": "^2.2.1", "tar": "^6.1.13", "wav-decoder": "^1.3.0", "yaml": "^2.2.1" }, "devDependencies": { "@nextcloud/axios": "^2.3.0", "@nextcloud/babel-config": "^1.0.0", "@nextcloud/browserslist-config": "^2.3.0", "@nextcloud/eslint-config": "^8.1.4", "@nextcloud/initial-state": "^2.0.0", "@nextcloud/router": "^2.0.0", "@nextcloud/stylelint-config": "^2.2.0", "@nextcloud/vue": "^7.7.1", "@nextcloud/webpack-vue-config": "^5.4.0", "@vue/test-utils": "^1.1.3", "async-parallel": "^1.2.3", "fast-glob": "^3.2.11", "flickr-sdk": "^6.0.0", "google-img-scrap": "^1.0.6", "vue": "^2.7.14" }, "engines": { "node": "^16.0.0", "npm": "^7.0.0 || ^8.0.0" }, "browserslist": [ "extends @nextcloud/browserslist-config" ] } root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # rm -rf ./node_modules root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # npm ci npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'recognize@3.6.3', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/axios@2.3.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/browser-storage@0.2.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/browserslist-config@2.3.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/calendar-js@5.0.3', npm WARN EBADENGINE required: { node: '>=16.0.0', npm: '>=8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/dialogs@4.0.1', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/typings@1.6.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/eslint-config@8.2.1', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/event-bus@3.0.2', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/l10n@2.1.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/logger@2.5.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/router@2.0.1', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/stylelint-config@2.3.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/vue@7.7.1', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@nextcloud/webpack-vue-config@5.4.0', npm WARN EBADENGINE required: { node: '^16.0.0', npm: '^7.0.0 || ^8.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@skjnldsv/sanitize-svg@1.0.2', npm WARN EBADENGINE required: { node: '^14.0.0', npm: '^7.0.0' }, npm WARN EBADENGINE current: { node: 'v14.21.1', npm: '9.4.2' } npm WARN EBADENGINE } npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated text-encoding@0.6.4: no longer maintained npm WARN deprecated superagent@6.1.0: Please upgrade to v7.0.2+ of superagent.We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases. npm ERR! code 1 npm ERR! path /usr/local/www/nextcloud/apps/recognize/node_modules/@tensorflow/tfjs-node npm ERR! command failed npm ERR! command sh -c node scripts/install.js npm ERR! /usr/local/www/nextcloud/apps/recognize/node_modules/@tensorflow/tfjs-node/scripts/deps-constants.js:86 npm ERR! throw new Error('Unsupported platform: ' + os.platform()); npm ERR! ^ npm ERR! npm ERR! Error: Unsupported platform: freebsd npm ERR! at Object. (/usr/local/www/nextcloud/apps/recognize/node_modules/@tensorflow/tfjs-node/scripts/deps-constants.js:86:9) npm ERR! at Module._compile (internal/modules/cjs/loader.js:1085:14) npm ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) npm ERR! at Module.load (internal/modules/cjs/loader.js:950:32) npm ERR! at Function.Module._load (internal/modules/cjs/loader.js:790:12) npm ERR! at Module.require (internal/modules/cjs/loader.js:974:19) npm ERR! at require (internal/modules/cjs/helpers.js:101:18) npm ERR! at Object. (/usr/local/www/nextcloud/apps/recognize/node_modules/@tensorflow/tfjs-node/scripts/install.js:36:5) npm ERR! at Module._compile (internal/modules/cjs/loader.js:1085:14) npm ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-15T22_42_23_741Z-debug-0.log root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # node -v v14.21.1 root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # npm -v 9.4.2

ts/install.js:36:5) npm ERR! at Module._compile (internal/modules/cjs/loader.js:1085:14) npm ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-15T22_42_23_741Z-debug-0.log root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # node -v v14.21.1 root@Nextcloud:/usr/local/www/nextcloud/apps/recognize # npm -v 9.4.2

florisdipt commented 1 year ago

I also noticed on the main readme page it says node 16 is required but on the if one-click install fails page it notes node 14.

Is there something i'm missing where you need one of them to build and another one to run? Because I can't image that being the case and i'm quite confused by this.

marcelklehr commented 1 year ago

I also noticed on the main readme page it says node 16 is required but on the if one-click install fails page it notes node 14.

both sould work, afaik.

Unsupported platform: freebsd

This is pretty self-explanatory, IMHO. Libtensorflow doesn't support freebsd. That means you can only run recognize in WASM mode.

florisdipt commented 1 year ago

This is pretty self-explanatory, IMHO. Libtensorflow doesn't support freebsd. That means you can only run recognize in WASM mode.

Okay thank you for the reply, that makes sense as freebsd doesn't have glibc.