Node-sqlite3: Error: Cannot find module node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node

Created on 14 Nov 2017  Â·  31Comments  Â·  Source: mapbox/node-sqlite3

Error: Cannot find module node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node

But i have node_modules/sqlite3/lib/binding/node-v48-linux-x64/node_sqlite3.node

Below the node and npm version that i'm using. Please help me to get rid of this issue
node version: v8.7.0
npm version: 5.4.2

Most helpful comment

Another workaround that worked for me:
npm uninstall sqlite3

and then:

npm install --save sqlite3

All 31 comments

The sqlite3 module works with Node.js v0.10.x, v0.12.x, v4.x, v5.x, v6.x and v7.x.

@mapbox-machine @hyfgirl any support for current node v9.x?

[4/4] 📃  Building fresh packages...
[1/9] â ‚ sqlite3: node-pre-gyp
[2/9] â ‚ puppeteer
[6/9] â ‚ gifsicle
[4/9] â ‚ fsevents: node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
error /Users/damz/Desktop/react-app/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /Users/damz/Desktop/react-app/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for "/Users/damz/Desktop/react-app/node_modules/sqlite3/lib/binding/node-v59-darwin-x64/node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-darwin-x64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-darwin-x64.tar.gz 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/damz/Desktop/react-app/node_modules/node-pre-gyp/lib/util/compile.js:77:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:159:13)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)
node-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:389:16)
node-pre-gyp ERR! stack     at _combinedTickCallback (internal/process/next_tick.js:138:11)
node-pre-gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:180:9)
node-pre-gyp ERR! System Darwin 17.2.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/9.2.1/bin/node" "/Users/damz/Desktop/react-app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/damz/Desktop/react-app/node_modules/sqlite3
node-pre-gyp ERR! node -v v9.2.1

Duplicate of #902

@wmertens I also have the problem,
Error: Cannot find module node_modules\sqlite3\libbindingnode-v54-win32-x64node_sqlite3.node
but I have node_modules\sqlite3\libbindingnode-v48-win32-x64node_sqlite3.node
node: v6.9.4
npm: 3.10.10

run npm rebuild

On Tue, Mar 20, 2018, 2:47 AM zjuchujinjin, notifications@github.com
wrote:

I also have the problem,
Error: Cannot find module
node_modules\sqlite3\libbindingnode-v54-win32-x64node_sqlite3.node
but I have
node_modules\sqlite3\libbindingnode-v48-win32-x64node_sqlite3.node
node: v6.9.4
npm: 3.10.10

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mapbox/node-sqlite3/issues/906#issuecomment-374444434,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADWlqxrJQZDHlVRcoCsv8fskikLgYhFks5tgF-ugaJpZM4Qc2J4
.

Where should i run "npm rebuild" ?

In your app folder. Also, this is not really an issue with this project,
but with npm not telling you that the node ABI changed when you update
NodeJS, so I propose you close this issue…

On Mon, Jun 18, 2018 at 7:58 AM Pushpendu Ghosh notifications@github.com
wrote:

Where should i run "npm rebuild" ?

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/mapbox/node-sqlite3/issues/906#issuecomment-397949650,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADWlhWhr2RD3dhpfmyqP_X30_bGxgB8ks5t90GIgaJpZM4Qc2J4
.

Besides deleting package-lock.json the other workaround here is to upgrade to [email protected], which should avoid this problem since it no longer uses bundledDependencies which trigger problems in recent npm versions > [email protected]. refs https://github.com/mapbox/node-pre-gyp/pull/403

Another workaround that worked for me:
npm uninstall sqlite3

and then:

npm install --save sqlite3

Using node v11.6.0 instead of v8.11.0 worked for me

Ugh....I'm having the same issue when trying to use Knex. It says it cannot find sqlite3 but is installed.

@reya276 re-run npm/yarn install. You've changed your version of node between installation and execution.

I was able to fix it, thanks.

Rey Angeles

On Fri, Jan 18, 2019, 8:13 PM Kewde <[email protected] wrote:

@reya276 https://github.com/reya276 re-run npm/yarn install. You've
changed your version of node between installation and execution.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mapbox/node-sqlite3/issues/906#issuecomment-455735011,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYVflCWZYRpcYiyGR0Zs49We8uhX9aklks5vEnE5gaJpZM4Qc2J4
.

Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/root/.node-red/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/root/.node-red/node_modules/usb/src/binding --napi_version=2 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59' (1)

root@RPi3AP:~# node -v
v9.9.0
root@RPi3AP:~# npm -v
5.6.0
root@RPi3AP:~#

running npm rebuild solved it for me

The sqlite3 module works with Node.js v0.10.x, v0.12.x, v4.x, v5.x, v6.x and v7.x.

Added more plateforms v8.x, v10.x, v11.x and v12.x.

Ugh....I'm having the same issue when trying to use Knex. It says it cannot find sqlite3 but is installed.

Did you fix this problem?
How did you fix?

@arnielcanillo the binaries for node-sqlite3 are downloaded a installation. If you've upgraded your version of Node then you have to re-install node-sqlite3.

I had this issue on Mac. Followed these steps:

# you need brew and nvm
brew install nvm

cd /var/www/gekko

#removed brew version of node
brew uninstall node
#removed all nvm versions of node
rm -rf ~/.nvm/versions/node/*

#stable version of node and nvm that works for gekko
nvm install 9.10.1
nvm alias default 9.10.1

#install gekko modules 
npm install --only=production
cd exchange
npm install --only=production
cd ..

#remove sqlite, tulip and talib
rm -rf ./node_modules/talib*
rm -rf ./node_modules/tulind*
rm -rf ./node_modules/sqlite3*

#Install tulip, sqlite and talib versions that are compatible
npm install [email protected] --no-save
npm install [email protected] --no-save
npm install [email protected]  --save 

Another workaround that worked for me:
npm uninstall sqlite3

and then:

npm install --save sqlite3

Nice working for me

@arunasank You the best! Thank you <3

Another workaround that worked for me:
npm uninstall sqlite3
and then:
npm install --save sqlite3

Nice working for me

Awesome. Works great!

@arunasank Your Amazing ! Thanks Alot

@wmertens Thanks, problem solved.

@arunasank Thanks!

Node
v12.11.1
npm
6.11.3
OS
ubuntu 18.04 LTS

this issue is still existing. I went through all workaround described in this thread. I didn't get any solution
Help me please

Same like @nikhilpk26 .

OS: Linux Mint 20 (Ubuntu derivation)
Node: v14.15.1 (but i tried older versions and not resolved).
NPM: 6.14.8

Hopefully this fixes the issue for @nikhilpk26 and @Miltonr87

I have:
Ubuntu 20.04.1 LTS
Node v14.15.1
Npm 6.14.8

I had to run:

sudo apt-get install sqlite3 libsqlite3-dev
npm rebuild

And it worked for me.

Thanks a lot @andrewshell , I forgot to inform here that I managed the issue with this solution and now
everything is ok! No old versions of Node needed to be used. Thanx again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sveinnM picture sveinnM  Â·  25Comments

hersoncruz picture hersoncruz  Â·  27Comments

royeradames picture royeradames  Â·  20Comments

csugden picture csugden  Â·  30Comments

sushantdhiman picture sushantdhiman  Â·  20Comments