title: Error: Could not locate the bindings file better-sqlite3.node
body: <p><strong>The Problem</strong></p>
  
  <p>There are some problem with maybe my installation of <code>better-sqlite3</code> because when I try to execute my <a href="https://pastebin.com/RHHj8ff6" rel="nofollow noreferrer">index.js</a> (click to show it on pastebin) with </p>
  
  <p><code>node index.js</code></p>
  
  <p>there is always the same result. I tried on MacOS, it works but in my machine Linux Lite Ubuntu based distro aren't it gave me the following same error:</p>
  
  <pre><code>/home/mp8/webproject/electron-better-sqlite/node_modules/bindings/bindings.js:96
    throw err
    ^
  
  Error: Could not locate the bindings file. Tried:
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/build/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/build/Release/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/Debug/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/out/Release/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/Release/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/build/default/better_sqlite3.node
   → /home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/compiled/8.11.3/linux/x64/better_sqlite3.node
      at bindings (/home/mp8/webproject/electron-better-sqlite/node_modules/bindings/bindings.js:93:9)
      at Object.&lt;anonymous&gt; (/home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/lib/database.js:4:40)
      at Module._compile (module.js:652:30)
      at Object.Module._extensions..js (module.js:663:10)
      at Module.load (module.js:565:32)
      at tryModuleLoad (module.js:505:12)
      at Function.Module._load (module.js:497:3)
      at Module.require (module.js:596:17)
      at require (internal/module.js:11:18)
      at Object.&lt;anonymous&gt; (/home/mp8/webproject/electron-better-sqlite/node_modules/better-sqlite3/index.js:2:18)
  </code></pre>
  
  <p><strong>What is my purpose?</strong></p>
  
  <p>I want to use better-sqlie33 as my database because sqlite3 doesn't gave the node 8.x and later support.</p>
  
  <p><strong>What I tried:</strong></p>
  
  <ol>
  <li><p>This trouble shooting guide number <a href="https://github.com/JoshuaWise/better-sqlite3/wiki/Troubleshooting-installation" rel="nofollow noreferrer">one and two</a>, but I still had the same error.</p></li>
  <li><p><code>make init</code>, first installed <code>better-sqlite3</code> gave me the error file make/makefile not found. I got the same error when I do <code>npm install better-sqlite3 --save</code></p></li>
  <li><p>Make sure <strong>better_sqlite3.node</strong> are on my <strong>node-modules</strong> path. yeah it isn't there.</p></li>
  </ol>
  
  <p><strong>What I want?</strong></p>
  
  <p>I want to run my <a href="https://pastebin.com/RHHj8ff6" rel="nofollow noreferrer">index.js</a> correctly like I ran it on Mac. </p>
  
  <p><strong>Dependecies</strong></p>
  
  <blockquote>
    <p>package.json after make init, if not it just a <code>better-sqlite3</code>  dependencies</p>
  </blockquote>
  
  <pre><code>{
    "_from": "better-sqlite3",
    "_id": "better-sqlite3@4.1.4",
    "_inBundle": false,
    "_integrity": "sha512-Y11HN9PQ9YUeKFMrmiHyOLAKElk2ATJzBZJvuzNwTMxoS7vUEEyLnUCtcBFqViLwbomr0RQwp2MBy/ogxF50PA==",
    "_location": "/better-sqlite3",
    "_phantomChildren": {},
    "_requested": {
      "type": "tag",
      "registry": true,
      "raw": "better-sqlite3",
      "name": "better-sqlite3",
      "escapedName": "better-sqlite3",
      "rawSpec": "",
      "saveSpec": null,
      "fetchSpec": "latest"
    },
    "_requiredBy": [
      "#USER",
      "/"
    ],
    "_resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-4.1.4.tgz",
    "_shasum": "9fe1dcf7b699087b98b1997cbb00261e265897e2",
    "_spec": "better-sqlite3",
    "_where": "/home/mp8/webproject/electron-better-sqlite",
    "author": {
      "name": "Joshua Wise",
      "email": "joshuathomaswise@gmail.com"
    },
    "bugs": {
      "url": "https://github.com/JoshuaWise/better-sqlite3/issues"
    },
    "bundleDependencies": false,
    "dependencies": {
      "bindings": "^1.3.0",
      "integer": "^1.0.5"
    },
    "deprecated": false,
    "description": "The fastest and simplest library for SQLite3 in Node.js.",
    "devDependencies": {
      "benchmark": "^2.1.4",
      "chai": "^4.1.2",
      "cli-color": "^1.2.0",
      "fs-extra": "^5.0.0",
      "mocha": "^4.1.0",
      "sqlite": "^2.9.0"
    },
    "gypfile": true,
    "homepage": "http://github.com/JoshuaWise/better-sqlite3",
    "keywords": [
      "sql",
      "sqlite",
      "sqlite3",
      "custom",
      "aggregate",
      "database",
      "transactions"
    ],
    "license": "MIT",
    "name": "better-sqlite3",
    "repository": {
      "type": "git",
      "url": "git://github.com/JoshuaWise/better-sqlite3.git"
    },
    "scripts": {
      "benchmark": "node benchmark",
      "install": "node-gyp rebuild",
      "install-debug": "node-gyp rebuild --debug",
      "lzz": "lzz -hx hpp -sx cpp -k BETTER_SQLITE3 -d -hl -sl -e ./src/better_sqlite3.lzz",
      "posttest": "rm -r ./temp/",
      "prepublishOnly": "npm run lzz",
      "pretest": "rm -r ./temp/ || true &amp;&amp; mkdir ./temp/",
      "rebuild": "npm run lzz &amp;&amp; node-gyp rebuild",
      "rebuild-debug": "npm run lzz &amp;&amp; node-gyp rebuild --debug",
      "test": "$(npm bin)/mocha --bail --timeout 5000 --slow 5000"
    },
    "version": "4.1.4"
  }
  </code></pre>
  
  <blockquote>
    <p>my machine</p>
  </blockquote>
  
  <pre><code>Linux Lite 4.0, Ubuntu Based.
  NVM (Node version Manager)
  Node 8.11.1
  NPM 5.6
  </code></pre>