Garden Installation Issue

I installed Garden using the documentation:

When I ran the command: garden create project, it displayed the below error:

(node:30812) UnhandledPromiseRejectionWarning: DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install better-sqlite3 --save
    at new DriverPackageNotInstalledError (/snapshot/project/tmp/pkg/cli/node_modules/typeorm-with-better-sqlite3/error/DriverPackageNotInstalledError.js:10:28)
    at BetterSqlite3Driver.loadDependencies (/snapshot/project/tmp/pkg/cli/node_modules/typeorm-with-better-sqlite3/driver/better-sqlite3/BetterSqlite3Driver.js:104:19)
    at new BetterSqlite3Driver (/snapshot/project/tmp/pkg/cli/node_modules/typeorm-with-better-sqlite3/driver/better-sqlite3/BetterSqlite3Driver.js:26:15)
    at DriverFactory.create (/snapshot/project/tmp/pkg/cli/node_modules/typeorm-with-better-sqlite3/driver/DriverFactory.js:45:24)
    at new Connection (/snapshot/project/tmp/pkg/cli/node_modules/typeorm-with-better-sqlite3/connection/Connection.js:54:59)
    at ConnectionManager.create (/snapshot/project/tmp/pkg/cli/node_modules/typeorm-with-better-sqlite3/connection/ConnectionManager.js:56:26)
    at getConnection (/snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/build/src/db/connection.js:0)
    at Object.<anonymous> (/snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/build/src/db/connection.js:0)
    at (<anonymous>)
    at /snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/build/src/db/connection.js:0
    at new Promise (<anonymous>)
    at /snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/build/src/db/connection.js:0
    at Object.ensureConnected (/snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/build/src/db/connection.js:0)
    at Object.<anonymous> (/snapshot/project/tmp/pkg/cli/build/src/cli.js:0)
    at (<anonymous>)
    at /snapshot/project/tmp/pkg/cli/build/src/cli.js:0
    at new Promise (<anonymous>)
    at /snapshot/project/tmp/pkg/cli/build/src/cli.js:0
    at Object.runCli (/snapshot/project/tmp/pkg/cli/build/src/cli.js:0)
    at Object.<anonymous> (/snapshot/project/tmp/pkg/cli/bin/garden:0)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
(node:30812) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 2)
(node:30812) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Hi @ankur328,
Could you please let me know what version of Garden your are using and what platform are you in?
Thanks a lot!


It is a headless ec2 instance, centos 7.8. I used the latest version as mentioned in documentation:

curl -sL | bash

Thanks, I’ll try to reproduce it and get back to you asap.

1 Like

Hi @ankur328, I was indeed able to reproduce the error on centos7.
We have been poking at the setup a bit and while doing so we realized centos7 comes with its own version of sqlite3 installed. garden uses a library called better-sqlite4 and we ship the sqlite the library compiles with the garden binary. We suspect that centos7 might be incompatible with better-sqlite3 or with some other libraries that are required by it.
One suggestion would be to see if upgrading sqlite to the latest version or installing better-sqlite3 globally solve the issue.

We also tried to install garden on a centos8 image and that went through without any problem, would using a more recent centos version work for you?

In case you want to go with the first path, this is the library I mentioned earlier:
GitHub - JoshuaWise/better-sqlite3: The fastest and simplest library for SQLite3 in Node.js..
There is also an issue where people were trying to install the package on centos7 which might be useful: Error while trying to install better-sqlite3 · Issue #579 · JoshuaWise/better-sqlite3 · GitHub.

Let us know if you manage to make it work and if we can help with anything else during the process.

Thanks a lot. I will try on CentOS 8.