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

Hello,

Gladys 4 developers, I need a hand to finalize my dev environment.

After initializing a brand new environment (nodejs, sqlite3, openssl, openzwave, …), I get this error when running the 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.

Yet sqlite3 is installed and working:

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$

I must have missed something, but what?

Thanks in advance for your help… :wink:

Hello!

You’re almost there :slight_smile:

It’s sqlite for nodejs, not the system.

So a quick npm install sqlite3 Should solve the problem

Actually, I hadn’t run it in the server folder of the project (as indicated in the error message), but only at the root. So it works better :blush:

Thanks for the help.