Node-sqlite3: Error to npm install sqlite3

Created on 23 Oct 2017  路  6Comments  路  Source: mapbox/node-sqlite3

Hi friends

I'm installing nodeJS in my server AIX 7.1, but when I want to download dependencies I see errors

[root@pxessd01] /Apps/XES/nodeJS/eduproxy>node --version
v6.11.4
[root@pxessd01] /Apps/XES/nodeJS/eduproxy>npm --version
3.10.10
[root@pxessd01] /Apps/XES/nodeJS/eduproxy>npm config set strict-ssl false
[root@pxessd01] /Apps/XES/nodeJS/eduproxy>npm config set rejectUnauthorized false
[root@pxessd01] /Apps/XES/nodeJS/eduproxy>npm install sqlite3

[email protected] install /Apps/XES/nodeJS/eduproxy/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v48-aix-ppc64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket. (_tls_wrap.js:1092:38)
gyp ERR! stack at emitNone (events.js:86:13)
gyp ERR! stack at TLSSocket.emit (events.js:185:7)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:610:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
gyp ERR! System AIX 7.1
gyp ERR! command "/ibm/node/bin/node" "/ibm/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/lib/binding/node-v48-aix-ppc64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/lib/binding/node-v48-aix-ppc64"
gyp ERR! cwd /Apps/XES/nodeJS/eduproxy/node_modules/sqlite3
gyp ERR! node -v v6.11.4
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/ibm/node/bin/node /ibm/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/lib/binding/node-v48-aix-ppc64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/lib/binding/node-v48-aix-ppc64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:920:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
node-pre-gyp ERR! System AIX 7.1
node-pre-gyp ERR! command "/ibm/node/bin/node" "/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Apps/XES/nodeJS/eduproxy/node_modules/sqlite3
node-pre-gyp ERR! node -v v6.11.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute '/ibm/node/bin/node /ibm/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/lib/binding/node-v48-aix-ppc64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Apps/XES/nodeJS/eduproxy/node_modules/sqlite3/lib/binding/node-v48-aix-ppc64' (1)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression
npm ERR! AIX 7.1
npm ERR! argv "/ibm/node/bin/node" "/ibm/node/bin/npm" "install" "sqlite3"
npm ERR! node v6.11.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Apps/XES/nodeJS/eduproxy/npm-debug.log

Can help me someone please?

Most helpful comment

I got this error on my Ubuntu 16.4 with nodejs (v4.2.6) and (3.5.2)

install the nodejs-legacy fixed the problem for me:
sudo apt install nodejs-legacy

All 6 comments

potential solution

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5

Link to OP: https://github.com/mapbox/node-sqlite3/issues/895

Hi my S.O es AIX 7.1, is the same solution?

Any updates on this?

I got this error on my Ubuntu 16.4 with nodejs (v4.2.6) and (3.5.2)

install the nodejs-legacy fixed the problem for me:
sudo apt install nodejs-legacy

sudo apt install nodejs-legacy

This solution worked for me too in Ubuntu 16.04.3 x64
Thank you.

If you have root but have to use an ancient node, how about using https://nixos.org/nix/ instead? You can control the node versions and all the dependencies, they get installed under /nix and do not interfere with the rest of the system.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikolasz picture mikolasz  路  3Comments

DenisCarriere picture DenisCarriere  路  3Comments

bradisbell picture bradisbell  路  3Comments

gabrielfgularte picture gabrielfgularte  路  3Comments

bmearnhardt picture bmearnhardt  路  4Comments