node-sqlite3 icon indicating copy to clipboard operation
node-sqlite3 copied to clipboard

Unable to install via npm in Ubuntu 20.04.5 LTS

Open ekaitz-zarraga opened this issue 2 years ago • 10 comments

Issue Summary

Unable to install via npm install sqlite3 in Ubuntu 20.04.5 LTS (x86_64) with:

  • Node: v19.8.1
  • NPM: 9.6.2
$ npm i sqlite3
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm ERR! code 1
npm ERR! path /home/alumno/projects/sql/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/alumno/.npm/_logs/2023-03-16T09_15_32_093Z-debug-0.log

2023-03-16T09_15_32_093Z-debug-0.log

Steps to Reproduce

  1. npm install sqlite3

Version

latest

Node.js Version

v19.8.1

How did you install the library?

npm install sqlite3

ekaitz-zarraga avatar Mar 16 '23 09:03 ekaitz-zarraga

Managed to install it correctly on my system (Debian Bullseye), same Node and NPM versions.

Ensure you have Node-gyp's dependencies satisfied (can't remember if python3-dev packages are necessary) and maybe give this a try:

npm cache clean --force

Can't think of anything else. Good luck homie.

sirikon avatar Mar 20 '23 22:03 sirikon

I managed to install node-gyp and node-pre-gyp with no issues but sqlite3 still fails to install. :cry:

ekaitz-zarraga avatar Mar 21 '23 07:03 ekaitz-zarraga

It happened again to me with bcrypt and looks it's happening to many people out there:

https://github.com/mapbox/node-pre-gyp/issues/661

ekaitz-zarraga avatar Mar 21 '23 12:03 ekaitz-zarraga

Same for me, but i use Ubuntu 22.04 version, someone found solution for this?

MikaMikuMik avatar Apr 23 '23 09:04 MikaMikuMik

okay, i somehow managed it this way:

  1. download package source zip
  2. npm install in package sources folder
  3. copy to MY project node_modules folder
  4. its works.

I hope normal install from "npm i" will be fixed soon...

MikaMikuMik avatar Apr 23 '23 12:04 MikaMikuMik

@MikaMikuMik It doesn't work for me. My OS is Ubuntu 22.04LTS, and my Node version is 18.16.0.

jeyhunr avatar Apr 23 '23 18:04 jeyhunr

@MikaMikuMik It doesn't work for me. My OS is Ubuntu 22.04LTS, and my Node version is 18.16.0.

I'm using the same config as yours, my node was set from snap packages, what error it gives to you? and when?

upd: I've added some details to my prev post.

MikaMikuMik avatar Apr 23 '23 20:04 MikaMikuMik

@MikaMikuMik It doesn't work for me. My OS is Ubuntu 22.04LTS, and my Node version is 18.16.0.

I'm using the same config as yours, my node was set from snap packages, what error it gives to you? and when?

upd: I've added some details to my prev post.

I tried to install it on Ubuntu but it didn't work, I always got the errors mentioned above. However, it worked in a Docker container.

jeyhunr avatar Apr 24 '23 19:04 jeyhunr

I have the same issue maybe @kkaefer or any other maintainer can check this out.

Screenshot from 2023-06-24 16-13-14

pacifiquem avatar Jun 24 '23 14:06 pacifiquem

Same here, Ubuntu 22.04LTS. yarn install works though

ivyazmitinov avatar Jul 12 '23 07:07 ivyazmitinov