TryGhost / node-sqlite3

SQLite3 bindings for Node.js
BSD 3-Clause "New" or "Revised" License
6.23k stars 817 forks source link

where is v36 #1798

Open jingpengju391 opened 2 months ago

jingpengju391 commented 2 months ago

Issue Summary

prebuild-install http request GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz

Steps to Reproduce

where is sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz!!!

Version

v5.1.7

Node.js Version

v20.15.1

How did you install the library?

pnpm

petrovelykyi commented 2 months ago

The same issue on linux

Goli4thus commented 2 months ago

Just stumbled over this on linux. Here's a quick workaronud (comment in #1782 helped to find this):

  1. locate node_modules/sqlite3/package.json (wherever you have it installed)
  2. locate this part:
  "binary": {
    "napi_versions": [
      3,
      6
    ]
  },
  1. remove the line with "3" in it

As a result it will reference "v6" and the prebuilt binary is downloaded just fine.

So I'm not sure what exactly is going on, but looks like (for some reason) this napi_verions array is concatenated to get to "36", which leads to the "v36" in the link, which breaks the prebuilt binary download.

isozar46 commented 2 months ago

Just stumbled over this on linux. Here's a quick workaronud (comment in #1782 helped to find this):

  1. locate node_modules/sqlite3/package.json (wherever you have it installed)
  2. locate this part:
  "binary": {
    "napi_versions": [
      3,
      6
    ]
  },
  1. remove the line with "3" in it

As a result it will reference "v6" and the prebuilt binary is downloaded just fine.

So I'm not sure what exactly is going on, but looks like (for some reason) this napi_verions array is concatenated to get to "36", which leads to the "v36" in the link, which breaks the prebuilt binary download.

i had the same problem and this seems to fix it for me, i only had it in windows, didn't have it in my linux laptop.

jingpengju391 commented 3 weeks ago

The same issue on linux

when you use npm (>=5) or yarn, patch-package created by the patch package will automatically and elegantly resolve the issue

pnpm can be used with patch & patch-commit resolve the issue

according to @isozar46 patch package