TryGhost / node-sqlite3

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

gyp ERR! stack Error: Cannot find module 'smart-buffer' #1745

Closed justorez closed 10 months ago

justorez commented 10 months ago

Issue Summary

# error
pnpm add sqlite3

But v5.1.6 is ok.

Relevant logs or output

node_modules/.pnpm/sqlite3@5.1.7-rc.0/node_modules/sqlite3: Running install script, failed in 12.9s
.../node_modules/sqlite3 install$ prebuild-install -r napi || node-gyp rebuild
│ prebuild-install warn install aborted
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@8.4.1
│ gyp info using node@20.9.0 | win32 | x64
│ gyp info find Python using Python version 3.10.5 found at "E:\Runtime\python3\python.exe"
│ gyp ERR! UNCAUGHT EXCEPTION
│ gyp ERR! stack Error: Cannot find module 'smart-buffer'
│ gyp ERR! stack Require stack:
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\socks@2.7.1\no…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\socks@2.7.1\no…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\socks-proxy-ag…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\make-fetch-hap…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\make-fetch-hap…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\make-fetch-hap…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\make-fetch-hap…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\make-fetch-hap…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\make-fetch-hap…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\node-gyp@8.4.1…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\node-gyp@8.4.1…
│ gyp ERR! stack - E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\node-gyp@8.4.1…
│ gyp ERR! stack     at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
│ gyp ERR! stack     at Module._load (node:internal/modules/cjs/loader:901:27)
│ gyp ERR! stack     at Module.require (node:internal/modules/cjs/loader:1115:19)
│ gyp ERR! stack     at require (node:internal/modules/helpers:130:18)
│ gyp ERR! stack     at Object.<anonymous> (E:\Workspace\.job\electron\electron-app\node_mod…
│ gyp ERR! stack     at Module._compile (node:internal/modules/cjs/loader:1241:14)
│ gyp ERR! stack     at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
│ gyp ERR! stack     at Module.load (node:internal/modules/cjs/loader:1091:32)
│ gyp ERR! stack     at Module._load (node:internal/modules/cjs/loader:938:12)
│ gyp ERR! stack     at Module.require (node:internal/modules/cjs/loader:1115:19)
│ gyp ERR! stack     at require (node:internal/modules/helpers:130:18)
│ gyp ERR! stack     at Object.<anonymous> (E:\Workspace\.job\electron\electron-app\node_mod…
│ gyp ERR! stack     at Module._compile (node:internal/modules/cjs/loader:1241:14)
│ gyp ERR! stack     at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
│ gyp ERR! stack     at Module.load (node:internal/modules/cjs/loader:1091:32)
│ gyp ERR! stack     at Module._load (node:internal/modules/cjs/loader:938:12)
│ gyp ERR! System Windows_NT 10.0.22621
│ gyp ERR! command "E:\\Runtime\\nodejs\\node.exe" "E:\\Workspace\\.job\\electron\\electron-…
│ gyp ERR! cwd E:\Workspace\.job\electron\electron-app\node_modules\.pnpm\sqlite3@5.1.7-rc.0…
│ gyp ERR! node -v v20.9.0
│ gyp ERR! node-gyp -v v8.4.1
│ gyp ERR! Node-gyp failed to build your package.
│ gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the …

Version

5.1.7-rc.0

Node.js Version

20.9.0

How did you install the library?

Windows11 x64

daniellockyer commented 10 months ago

This looks similar to https://github.com/sass/node-sass/issues/2005 - I don't think it's an issue in node-sqlite3 and you should look at debugging why packages don't install properly