Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Sqlite Errors when setting up Apollo Server for tutorial #992

Open
jmahmood opened this issue Sep 10, 2020 · 2 comments
Open

Sqlite Errors when setting up Apollo Server for tutorial #992

jmahmood opened this issue Sep 10, 2020 · 2 comments

Comments

@jmahmood
Copy link

Hi,

There are errors when running the Apollo tutorial on Ubuntu 20.04. This appears to be an issue with the install script for node-sqlite3.

cd start/server && npm install

I found a similar issue here; the cause is Ubuntu putting node-js into a different directory. As @multivac61 says;

I traced the problem down to nodejs not being available in the path /usr/bin/node. Once I linked the nodejs binary to that path sqlite3 installed like a charm. You can link nodejs to /usr/bin/node using the following command:

I fixed this by running the following command;

npm uninstall sqlite3
npm cache clean
sudo npm install sqlite3

It might be worth having a note for Ubuntu users in the documentation.

@mihaildono
Copy link

The version set in the package json does not support node v14. Bump to sqlite to v5 to make it work :)

@saez-juan
Copy link

Sorry I'm late, I've just worked out.

On your package.json you have to change:

{
    // ...,
    "dependencies": {
        /// ...,
        "sqlite3": "5.0.2" //=> previously "sqlite3": "^4.0.3" (probably)
    }
}       

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants