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

Can't install sqlite3 #198

Open
hjrobinson opened this issue Jan 23, 2021 · 9 comments
Open

Can't install sqlite3 #198

hjrobinson opened this issue Jan 23, 2021 · 9 comments

Comments

@hjrobinson
Copy link

I apologize if this issue has already been addressed but I can't install sqlite3. So I've tried to fix this on my own to no avail by changing node versions and installing different versions of sqlite3. Any advice is appreciated. I have Visual Studio code installed and I use Windows 8. I'm not sure if that matters.

@abiola-ajibola
Copy link

Update it to version 5.0.0

See TryGhost/node-sqlite3#1430

@hjrobinson
Copy link
Author

hjrobinson commented Jan 24, 2021

Yes you are correct I needed to use this version. By the way I erred in my statement above. I don't know if having VSCode installed matters. Also because I am using Windows 8 I needed the appropriate sdk which is not available with the latest VSCommunity (it seems this one only comes with the sdk for Windows 10). Altogether it took me 12 hours to figure out how to successfully install sqlite3. So here's what I did.

  1. Fresh install of node making sure you check the box for having Chocolatey, Python, and all the extra stuff installed.

  2. Download VSCommunity 2015 from here:
    https://my.visualstudio.com/Downloads/Featured?mkt=en-us

I did check some boxes for installing extra stuff with VSCommunity 2015. I can't remember what boxes those were and I don't know if that part mattered.

  1. Then install sqlite3@5.0.0 per your advice above (either update the package.json or just run the command):
    npm install sqlite3@5.0.0

So if anyone else is living in the past with Windows 8 this should point you in the right direction for completing the install. Good luck!

@OctavioBR
Copy link

Since the pre-built binaries are unavailable (403) from https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz, node-pre-gyp will actually require python to be installed on your machine to successfully install sqlite

@abiola-ajibola
Copy link

Oh, I see, I do not have Python installed on my machine, so I used another version of SQLite.

@Solrac23
Copy link

I have Python on machine, but it still doesn't work.
my OS is POP_OS.

@hjrobinson
Copy link
Author

hjrobinson commented Jan 28, 2021

I just wanted to add here that I was installing the packages for the final version of the server and even after updating the package.json to install 5.0.0 it automatically installed sqlite3 version 5.0.1 resulting in an installation error. When I ran npm install sqlite3@5.0.0 sqlite3 installed correctly.

@abiola-ajibola
Copy link

I just wanted to add here that I was installing the packages for the final version of the server and even after updating the package.json to install 5.0.0 it automatically installed sqlite3 version 5.0.1 resulting in an installation error. When I ran npm install sqlite3@5.0.0 sqlite3 installed correctly.

You can use *5.0.0 interest of ^5.0.0 or ~5.0.0 in your package.json

@hjrobinson
Copy link
Author

I know these things are kind of obvious but if you have a package-lock.json leftover from a failed install you will want to delete that before making your next attempt and it may be a good idea to run your installs as admin in the Windows terminal.

@jlpg81
Copy link

jlpg81 commented May 9, 2021

Guys if youre sure that updating sqlite3 to version 5 wont break anything, Id suggest we update the dependencies in the package.json. This tutorial is supposed to help people get into apollo grapqhql, having an error appear with the first command can drive people away.

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

No branches or pull requests

6 participants