fullstack-tutorial icon indicating copy to clipboard operation
fullstack-tutorial copied to clipboard

Can't install sqlite3

Open hjrobinson opened this issue 5 years ago • 9 comments

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.

hjrobinson avatar Jan 23 '21 00:01 hjrobinson

Update it to version 5.0.0

See https://github.com/mapbox/node-sqlite3/issues/1430

abiola-ajibola avatar Jan 23 '21 13:01 abiola-ajibola

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 [email protected] per your advice above (either update the package.json or just run the command): npm install [email protected]

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!

hjrobinson avatar Jan 24 '21 18:01 hjrobinson

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

OctavioBR avatar Jan 28 '21 03:01 OctavioBR

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

abiola-ajibola avatar Jan 28 '21 10:01 abiola-ajibola

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

Solrac23 avatar Jan 28 '21 19:01 Solrac23

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 [email protected] sqlite3 installed correctly.

hjrobinson avatar Jan 28 '21 20:01 hjrobinson

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 [email protected] sqlite3 installed correctly.

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

abiola-ajibola avatar Jan 28 '21 22:01 abiola-ajibola

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.

hjrobinson avatar Jan 29 '21 23:01 hjrobinson

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.

jlpg81 avatar May 09 '21 22:05 jlpg81