[Gladys 4] Erreur "Please install sqlite3 package manually"

Hello,

Avis aux développeurs Gladys 4, j’ai besoin d’un coup de main pour finaliser mon environnement de dev.

Après avoir initialisé un environnement tout neuf (nodejs, sqlite3, openssl, openzwave, …), j’ai cette erreur lors du lancement des tests :

user@localhost:/mnt/d/Projets/Gladys/Sources/Gladys$ npm test

> gladys@4.0.0-alpha test /mnt/d/Projets/Gladys/Sources/Gladys
> run-p test-server test-front


> gladys@4.0.0-alpha test-server /mnt/d/Projets/Gladys/Sources/Gladys
> cd server && npm test


> gladys@4.0.0-alpha test-front /mnt/d/Projets/Gladys/Sources/Gladys
> cd front && npm test


> gladys-server@ pretest /mnt/d/Projets/Gladys/Sources/Gladys/server
> cross-env SQLITE_FILE_PATH=/tmp/gladys-test.db npm run db-migrate:test && npm run eslint


> gladys-front@ test /mnt/d/Projets/Gladys/Sources/Gladys/front
> jest --coverage


> gladys-server@ db-migrate:test /mnt/d/Projets/Gladys/Sources/Gladys/server
> cross-env NODE_ENV=test node_modules/.bin/sequelize db:migrate


Sequelize CLI [Node: 10.16.1, CLI: 5.4.0, ORM: 4.42.0]

Loaded configuration file "config/config.js".
Using environment "test".

ERROR: Please install sqlite3 package manually

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gladys-server@ db-migrate:test: `cross-env NODE_ENV=test node_modules/.bin/sequelize db:migrate`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gladys-server@ db-migrate:test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nicolas/.npm/_logs/2019-08-04T09_16_00_555Z-debug.log
npm ERR! Test failed.  See above for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gladys@4.0.0-alpha test-server: `cd server && npm test`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gladys@4.0.0-alpha test-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nicolas/.npm/_logs/2019-08-04T09_16_00_592Z-debug.log
ERROR: "test-server" exited with 1.
npm ERR! Test failed.  See above for more details.

Pourtant sqlite3 est installé et fonctionne :

user@localhost:/mnt/d/Projets/Gladys/Sources/Gladys$ sqlite3
SQLite version 3.22.0 2018-01-22 18:45:57
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .exit
user@localhost:/mnt/d/Projets/Gladys/Sources/Gladys$ 

J’ai du loupé un truc, mais quoi ?

Merci d’avance pour votre aide… :wink:

Salut !

Tu y es presque :slight_smile:

C’est sqlite côté nodejs pas système.

Donc un petit npm install sqlite3 Devrait résoudre le problème

En fait, je ne l’avais pas lancé dans le dossier server du projet (comme indiqué dans le message d’erreur), mais uniquement à la racine. Du coup ça marche mieux :blush:

Merci du coup de main.