Ceci est une prise de notes sur l’installation de Vigilo pour le CADRes Colmar et environs.
Vigilo est une application de signalement de problème sur la voirie. Elle est composée de deux partie:
- vigilo-webapp: C’est l’interface pour déclarer les observations et les modérer. Elle est codée en node.js et se connecte au backend pour la sauvegarde des données.
- vigilo-backend: c’est la partie serveur qui est codée en PHP/MySQL et qui stock les observation dans la base de données.
Il est possible de n’installer que la partie backend sur un hébergement mutualisé type OVH qu’on utilise souvent pour les site web. Il suffit ensuite de demander la «connexion» à l’application officiel installé sur vigilo.city https://app.vigilo.city/.
Vigilo Backend
L’installation du backend est relativement est expliqué ici. Ça se fait relativement bien, mais il semble y avoir un bug lorsque l’on utilise pas le service MapQuest : la génération des images ne fonctionne pas de même que la modération.
Vigilo WebApp
Là c’est une autre paire de manche car c’est du node.js, et j’ai pas l’impression que ça tourne sur notre serveur mutualisé d’OVH.
Il serait pourtant intéressant de pouvoir le faire tourner sur un hébergement que l’on maîtrise pour pouvoir le faire évoluer. Et notamment pour pouvoir ajouter des catégories.
Installation de WebApp en local
Avant d’essayer de le déployer sur un serveur essayons de faire ça en local :
$ cd /opt/
$ mkdir vigilo;cd vigilo
$ git clone https://github.com/jesuisundesdeux/vigilo-webapp.git
$ cd vigilo-webapp.git
$ npm install
npm WARN deprecated osenv@0.1.5: This package is no longer supported.
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 source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated figgy-pudding@3.5.2: This module is no longer supported.
npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated npmlog@4.1.2: This package is no longer supported.
npm WARN deprecated copy-concurrently@1.0.5: This package is no longer supported.
npm WARN deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
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 fstream@1.0.12: This package is no longer supported.
npm WARN deprecated move-concurrently@1.0.1: This package is no longer supported.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated fs-write-stream-atomic@1.0.10: This package is no longer supported.
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 WARN deprecated gauge@2.7.4: This package is no longer supported.
npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please
npm ERR! code 1
npm ERR! path /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli '/usr/local/bin/node',
npm ERR! gyp verb cli '/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@21.7.2 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:203:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:203:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python /usr/bin/python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at genericNodeError (node:internal/errors:984:15)
npm ERR! gyp ERR! stack at wrappedFn (node:internal/errors:538:14)
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:422:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! gyp ERR! System Linux 5.15.0-126-generic
npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/fabien/www/cadrescolmar/vigilo-webapp/node_modules/node-sass
npm ERR! gyp ERR! node -v v21.7.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
Bon il a besoin de python2 ?! Ça date un peu tout ça.