microlinkhq/keyvhq

[Error] Unable to install @keyvhq/sqlite due to sqlite package error

wychwitch opened this issue · 1 comments

Hello! I'm trying this out for use with my discordbot, and I ran into an issue when running npm install with the sqlite package. It looks like there may be an issue with the @vscode/sqlite package, as trying to install it separately also has the same issue. Looks to be a similar issue in this project, which (apparently?) the solution was to switch to better-sqlite3 rather than sqlite3?

If you need any more info let me know! I'm running this on node v18.1.0, and through WSL (debian)

Here's the log<\summary>
0 verbose cli /home/wych/.nvm/versions/node/v18.1.0/bin/node /home/wych/.nvm/versions/node/v18.1.0/bin/npm
1 info using npm@8.8.0
2 info using node@v18.1.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/home/wych/.nvm/versions/node/v18.1.0/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/mnt/c/Git/AradiabotJS/.npmrc Completed in 0ms
10 timing config:load:project Completed in 7ms
11 timing config:load:file:/home/wych/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/home/wych/.nvm/versions/node/v18.1.0/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 12ms
19 timing npm:load:configload Completed in 12ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm install @keyvhq/sqlite
23 verbose argv "install" "@keyvhq/sqlite"
24 timing npm:load:setTitle Completed in 0ms
25 timing config:load:flatten Completed in 2ms
26 timing npm:load:display Completed in 3ms
27 verbose logfile logs-max:10 dir:/home/wych/.npm/_logs
28 verbose logfile /home/wych/.npm/_logs/2022-07-20T19_00_58_303Z-debug-0.log
29 timing npm:load:logFile Completed in 7ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 24ms
33 timing arborist:ctor Completed in 0ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 75ms
37 timing idealTree:userRequests Completed in 2ms
38 silly idealTree buildDeps
39 silly fetch manifest @keyvhq/sqlite@*
40 timing arborist:ctor Completed in 0ms
41 http fetch GET 200 https://registry.npmjs.org/@keyvhq%2fsqlite 858ms (cache miss)
42 silly placeDep ROOT @keyvhq/sqlite@1.6.20 OK for: aradiabotjs@1.0.0 want: *
43 silly fetch manifest @keyvhq/sql@^1.6.15
44 silly fetch manifest @vscode/sqlite3@~5.0.8
45 http fetch GET 200 https://registry.npmjs.org/@vscode%2fsqlite3 456ms (cache miss)
46 http fetch GET 200 https://registry.npmjs.org/@keyvhq%2fsql 688ms (cache miss)
47 timing idealTree:#root Completed in 1553ms
48 silly placeDep ROOT @keyvhq/sql@1.6.15 OK for: @keyvhq/sqlite@1.6.20 want: ^1.6.15
49 silly placeDep ROOT @vscode/sqlite3@5.0.8 OK for: @keyvhq/sqlite@1.6.20 want: ~5.0.8
50 silly fetch manifest sql-ts@5
51 http fetch GET 200 https://registry.npmjs.org/sql-ts 415ms (cache miss)
52 timing idealTree:node_modules/@keyvhq/sqlite Completed in 419ms
53 silly placeDep ROOT sql-ts@5.3.0 OK for: @keyvhq/sql@1.6.15 want: 5
54 silly fetch manifest lodash@^4.17.20
55 silly fetch manifest sliced@~1.0.x
56 silly fetch manifest tslib@~2.0.1
57 http fetch GET 200 https://registry.npmjs.org/tslib 69ms (cache revalidated)
58 http fetch GET 200 https://registry.npmjs.org/lodash 98ms (cache updated)
59 http fetch GET 200 https://registry.npmjs.org/sliced 134ms (cache updated)
60 timing idealTree:node_modules/@keyvhq/sql Completed in 136ms
61 timing idealTree:node_modules/@vscode/sqlite3 Completed in 0ms
62 silly placeDep ROOT lodash@4.17.21 OK for: sql-ts@5.3.0 want: ^4.17.20
63 silly placeDep ROOT sliced@1.0.1 OK for: sql-ts@5.3.0 want: ~1.0.x
64 silly placeDep node_modules/sql-ts tslib@2.0.3 OK for: sql-ts@5.3.0 want: ~2.0.1
65 timing idealTree:node_modules/sql-ts Completed in 4ms
66 timing idealTree:node_modules/lodash Completed in 0ms
67 timing idealTree:node_modules/sliced Completed in 0ms
68 timing idealTree:node_modules/sql-ts/node_modules/tslib Completed in 0ms
69 timing idealTree:buildDeps Completed in 2112ms
70 timing idealTree:fixDepFlags Completed in 1ms
71 timing idealTree Completed in 2192ms
72 timing reify:loadTrees Completed in 2193ms
73 timing reify:diffTrees Completed in 39ms
74 silly reify moves {}
75 timing reify:retireShallow Completed in 1ms
76 timing reify:createSparse Completed in 13ms
77 timing reify:loadBundles Completed in 0ms
78 silly audit bulk request {
78 silly audit   '@discordjs/builders': [ '1.0.0' ],
78 silly audit   '@discordjs/collection': [ '1.0.0' ],
78 silly audit   '@discordjs/rest': [ '1.0.0' ],
78 silly audit   '@gar/promisify': [ '1.1.3' ],
78 silly audit   '@keyv/sqlite': [ '3.5.3' ],
78 silly audit   '@keyvhq/core': [ '1.6.14' ],
78 silly audit   '@mapbox/node-pre-gyp': [ '1.0.9' ],
78 silly audit   '@npmcli/fs': [ '1.1.1' ],
78 silly audit   '@npmcli/move-file': [ '1.1.2' ],
78 silly audit   '@sapphire/async-queue': [ '1.3.2' ],
78 silly audit   '@sapphire/shapeshift': [ '3.5.1' ],
78 silly audit   '@sapphire/snowflake': [ '3.2.2' ],
78 silly audit   '@tokenizer/token': [ '0.3.0' ],
78 silly audit   '@tootallnate/once': [ '1.1.2' ],
78 silly audit   '@types/json-buffer': [ '3.0.0' ],
78 silly audit   '@types/node': [ '18.0.6' ],
78 silly audit   '@types/ws': [ '8.5.3' ],
78 silly audit   abbrev: [ '1.1.1' ],
78 silly audit   'agent-base': [ '6.0.2' ],
78 silly audit   agentkeepalive: [ '4.2.1' ],
78 silly audit   'aggregate-error': [ '3.1.0' ],
78 silly audit   'ansi-regex': [ '5.0.1' ],
78 silly audit   aproba: [ '2.0.0' ],
78 silly audit   'are-we-there-yet': [ '2.0.0', '3.0.0' ],
78 silly audit   'balanced-match': [ '1.0.2' ],
78 silly audit   'brace-expansion': [ '1.1.11' ],
78 silly audit   cacache: [ '15.3.0' ],
78 silly audit   chownr: [ '2.0.0' ],
78 silly audit   'clean-stack': [ '2.2.0' ],
78 silly audit   'color-support': [ '1.1.3' ],
78 silly audit   'compress-brotli': [ '1.3.8' ],
78 silly audit   'concat-map': [ '0.0.1' ],
78 silly audit   'console-control-strings': [ '1.1.0' ],
78 silly audit   debug: [ '4.3.4' ],
78 silly audit   delegates: [ '1.0.0' ],
78 silly audit   depd: [ '1.1.2' ],
78 silly audit   'detect-libc': [ '2.0.1' ],
78 silly audit   'discord-api-types': [ '0.36.2' ],
78 silly audit   'discord.js': [ '14.0.3' ],
78 silly audit   'emoji-regex': [ '8.0.0' ],
78 silly audit   encoding: [ '0.1.13' ],
78 silly audit   'env-paths': [ '2.2.1' ],
78 silly audit   'err-code': [ '2.0.3' ],
78 silly audit   'fast-deep-equal': [ '3.1.3' ],
78 silly audit   'file-type': [ '17.1.2' ],
78 silly audit   'fs-minipass': [ '2.1.0' ],
78 silly audit   'fs.realpath': [ '1.0.0' ],
78 silly audit   gauge: [ '3.0.2', '4.0.4' ],
78 silly audit   glob: [ '7.2.3' ],
78 silly audit   'graceful-fs': [ '4.2.10' ],
78 silly audit   'has-unicode': [ '2.0.1' ],
78 silly audit   'http-cache-semantics': [ '4.1.0' ],
78 silly audit   'http-proxy-agent': [ '4.0.1' ],
78 silly audit   'https-proxy-agent': [ '5.0.1' ],
78 silly audit   'humanize-ms': [ '1.2.1' ],
78 silly audit   'iconv-lite': [ '0.6.3' ],
78 silly audit   ieee754: [ '1.2.1' ],
78 silly audit   imurmurhash: [ '0.1.4' ],
78 silly audit   'indent-string': [ '4.0.0' ],
78 silly audit   'infer-owner': [ '1.0.4' ],
78 silly audit   inflight: [ '1.0.6' ],
78 silly audit   inherits: [ '2.0.4' ],
78 silly audit   ip: [ '2.0.0' ],
78 silly audit   'is-fullwidth-code-point': [ '3.0.0' ],
78 silly audit   'is-lambda': [ '1.0.1' ],
78 silly audit   isexe: [ '2.0.0' ],
78 silly audit   'json-buffer': [ '3.0.1' ],
78 silly audit   keyv: [ '4.3.3' ],
78 silly audit   'lodash.snakecase': [ '4.1.1' ],
78 silly audit   'lodash.uniqwith': [ '4.5.0' ],
78 silly audit   'lru-cache': [ '6.0.0' ],
78 silly audit   'make-dir': [ '3.1.0' ],
78 silly audit   semver: [ '6.3.0', '7.3.7' ],
78 silly audit   'make-fetch-happen': [ '9.1.0' ],
78 silly audit   minimatch: [ '3.1.2' ],
78 silly audit   minipass: [ '3.3.4' ],
78 silly audit   'minipass-collect': [ '1.0.2' ],
78 silly audit   'minipass-fetch': [ '1.4.1' ],
78 silly audit   'minipass-flush': [ '1.0.5' ],
78 silly audit   'minipass-pipeline': [ '1.2.4' ],
78 silly audit   'minipass-sized': [ '1.0.3' ],
78 silly audit   minizlib: [ '2.1.2' ],
78 silly audit   mkdirp: [ '1.0.4' ],
78 silly audit   ms: [ '2.1.2' ],
78 silly audit   negotiator: [ '0.6.3' ],
78 silly audit   'node-addon-api': [ '4.3.0' ],
78 silly audit   'node-fetch': [ '2.6.7' ],
78 silly audit   'node-gyp': [ '8.4.1' ],
78 silly audit   npmlog: [ '6.0.2', '5.0.1' ],
78 silly audit   nopt: [ '5.0.0' ],
78 silly audit   'object-assign': [ '4.1.1' ],
78 silly audit   once: [ '1.4.0' ],
78 silly audit   'p-map': [ '4.0.0' ],
78 silly audit   'path-is-absolute': [ '1.0.1' ],
78 silly audit   'peek-readable': [ '5.0.0-alpha.5' ],
78 silly audit   pify: [ '5.0.0' ],
78 silly audit   'promise-inflight': [ '1.0.1' ],
78 silly audit   'promise-retry': [ '2.0.1' ],
78 silly audit   'readable-stream': [ '3.6.0' ],
78 silly audit   'readable-web-to-node-stream': [ '3.0.2' ],
78 silly audit   retry: [ '0.12.0' ],
78 silly audit   rimraf: [ '3.0.2' ],
78 silly audit   'safe-buffer': [ '5.2.1' ],
78 silly audit   'safer-buffer': [ '2.1.2' ],
78 silly audit   'set-blocking': [ '2.0.0' ],
78 silly audit   'signal-exit': [ '3.0.7' ],
78 silly audit   'smart-buffer': [ '4.2.0' ],
78 silly audit   socks: [ '2.7.0' ],
78 silly audit   'socks-proxy-agent': [ '6.2.1' ],
78 silly audit   sqlite3: [ '5.0.9' ],
78 silly audit   ssri: [ '8.0.1' ],
78 silly audit   string_decoder: [ '1.3.0' ],
78 silly audit   'string-width': [ '4.2.3' ],
78 silly audit   'strip-ansi': [ '6.0.1' ],
78 silly audit   strtok3: [ '7.0.0-alpha.8' ],
78 silly audit   tar: [ '6.1.11' ],
78 silly audit   'token-types': [ '5.0.0-alpha.2' ],
78 silly audit   tr46: [ '0.0.3' ],
78 silly audit   'ts-mixer': [ '6.0.1' ],
78 silly audit   tslib: [ '2.4.0', '2.0.3' ],
78 silly audit   undici: [ '5.8.0' ],
78 silly audit   'unique-filename': [ '1.1.1' ],
78 silly audit   'unique-slug': [ '2.0.2' ],
78 silly audit   'util-deprecate': [ '1.0.2' ],
78 silly audit   'webidl-conversions': [ '3.0.1' ],
78 silly audit   'whatwg-url': [ '5.0.0' ],
78 silly audit   which: [ '2.0.2' ],
78 silly audit   'wide-align': [ '1.1.5' ],
78 silly audit   wrappy: [ '1.0.2' ],
78 silly audit   ws: [ '8.8.1' ],
78 silly audit   yallist: [ '4.0.0' ],
78 silly audit   '@keyvhq/sqlite': [ '1.6.20' ],
78 silly audit   '@keyvhq/sql': [ '1.6.15' ],
78 silly audit   '@vscode/sqlite3': [ '5.0.8' ],
78 silly audit   'sql-ts': [ '5.3.0' ],
78 silly audit   lodash: [ '4.17.21' ],
78 silly audit   sliced: [ '1.0.1' ]
78 silly audit }
79 silly tarball no local data for sql-ts@https://registry.npmjs.org/sql-ts/-/sql-ts-5.3.0.tgz. Extracting by manifest.
80 silly tarball no local data for sliced@https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz. Extracting by manifest.
81 silly tarball no local data for @keyvhq/sql@https://registry.npmjs.org/@keyvhq/sql/-/sql-1.6.15.tgz. Extracting by manifest.
82 silly tarball no local data for @keyvhq/sqlite@https://registry.npmjs.org/@keyvhq/sqlite/-/sqlite-1.6.20.tgz. Extracting by manifest.
83 silly tarball no local data for @vscode/sqlite3@https://registry.npmjs.org/@vscode/sqlite3/-/sqlite3-5.0.8.tgz. Extracting by manifest.
84 silly tarball no local data for tslib@https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz. Extracting by manifest.
85 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 226ms
86 timing auditReport:getReport Completed in 230ms
87 silly audit report {}
88 timing auditReport:init Completed in 0ms
89 timing reify:audit Completed in 231ms
90 http fetch GET 200 https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz 166ms (cache miss)
91 timing reifyNode:node_modules/sql-ts/node_modules/tslib Completed in 284ms
92 http fetch GET 200 https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz 263ms (cache miss)
93 timing reifyNode:node_modules/sliced Completed in 290ms
94 http fetch GET 200 https://registry.npmjs.org/@keyvhq/sql/-/sql-1.6.15.tgz 574ms (cache miss)
95 timing reifyNode:node_modules/@keyvhq/sql Completed in 605ms
96 http fetch GET 200 https://registry.npmjs.org/@keyvhq/sqlite/-/sqlite-1.6.20.tgz 983ms (cache miss)
97 timing reifyNode:node_modules/@keyvhq/sqlite Completed in 1018ms
98 http fetch GET 200 https://registry.npmjs.org/@vscode/sqlite3/-/sqlite3-5.0.8.tgz 1041ms (cache miss)
99 timing reifyNode:node_modules/@vscode/sqlite3 Completed in 1086ms
100 http fetch GET 200 https://registry.npmjs.org/sql-ts/-/sql-ts-5.3.0.tgz 1598ms (cache miss)
101 timing reifyNode:node_modules/sql-ts Completed in 1622ms
102 timing reifyNode:node_modules/lodash Completed in 2749ms
103 timing reify:unpack Completed in 2749ms
104 timing reify:unretire Completed in 1ms
105 timing build:queue Completed in 13ms
106 info run @vscode/sqlite3@5.0.8 install node_modules/@vscode/sqlite3 node-gyp rebuild
107 info run @vscode/sqlite3@5.0.8 install { code: 1, signal: null }
108 timing reify:rollback:createSparse Completed in 2144ms
109 timing reify:rollback:retireShallow Completed in 0ms
110 timing command:install Completed in 15302ms
111 verbose stack Error: command failed
111 verbose stack     at ChildProcess.<anonymous> (/home/wych/.nvm/versions/node/v18.1.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
111 verbose stack     at ChildProcess.emit (node:events:527:28)
111 verbose stack     at maybeClose (node:internal/child_process:1090:16)
111 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
112 verbose pkgid @vscode/sqlite3@5.0.8
113 verbose cwd /mnt/c/Git/AradiabotJS
114 verbose Linux 5.10.16.3-microsoft-standard-WSL2
115 verbose node v18.1.0
116 verbose npm  v8.8.0
117 error code 1
118 error path /mnt/c/Git/AradiabotJS/node_modules/@vscode/sqlite3
119 error command failed
120 error command sh -c node-gyp rebuild
121 error gyp info it worked if it ends with ok
121 error gyp info using node-gyp@8.4.1
121 error gyp info using node@18.1.0 | linux | x64
121 error gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
121 error gyp http GET https://nodejs.org/download/release/v18.1.0/node-v18.1.0-headers.tar.gz
121 error gyp http 200 https://nodejs.org/download/release/v18.1.0/node-v18.1.0-headers.tar.gz
121 error gyp http GET https://nodejs.org/download/release/v18.1.0/SHASUMS256.txt
121 error gyp http 200 https://nodejs.org/download/release/v18.1.0/SHASUMS256.txt
121 error gyp info spawn /usr/bin/python3
121 error gyp info spawn args [
121 error gyp info spawn args   '/mnt/c/Git/AradiabotJS/node_modules/node-gyp/gyp/gyp_main.py',
121 error gyp info spawn args   'binding.gyp',
121 error gyp info spawn args   '-f',
121 error gyp info spawn args   'make',
121 error gyp info spawn args   '-I',
121 error gyp info spawn args   '/mnt/c/Git/AradiabotJS/node_modules/@vscode/sqlite3/build/config.gypi',
121 error gyp info spawn args   '-I',
121 error gyp info spawn args   '/mnt/c/Git/AradiabotJS/node_modules/node-gyp/addon.gypi',
121 error gyp info spawn args   '-I',
121 error gyp info spawn args   '/home/wych/.cache/node-gyp/18.1.0/include/node/common.gypi',
121 error gyp info spawn args   '-Dlibrary=shared_library',
121 error gyp info spawn args   '-Dvisibility=default',
121 error gyp info spawn args   '-Dnode_root_dir=/home/wych/.cache/node-gyp/18.1.0',
121 error gyp info spawn args   '-Dnode_gyp_dir=/mnt/c/Git/AradiabotJS/node_modules/node-gyp',
121 error gyp info spawn args   '-Dnode_lib_file=/home/wych/.cache/node-gyp/18.1.0/<(target_arch)/node.lib',
121 error gyp info spawn args   '-Dmodule_root_dir=/mnt/c/Git/AradiabotJS/node_modules/@vscode/sqlite3',
121 error gyp info spawn args   '-Dnode_engine=v8',
121 error gyp info spawn args   '--depth=.',
121 error gyp info spawn args   '--no-parallel',
121 error gyp info spawn args   '--generator-output',
121 error gyp info spawn args   'build',
121 error gyp info spawn args   '-Goutput_dir=.'
121 error gyp info spawn args ]
121 error Debugger listening on ws://127.0.0.1:53693/59a12562-1066-428a-8266-e0ff1f4214f0
121 error For help, see: https://nodejs.org/en/docs/inspector
121 error Debugger attached.
121 error Waiting for the debugger to disconnect...
121 error gyp: Call to 'node -p "require('node-addon-api').gyp"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
121 error gyp ERR! configure error 
121 error gyp ERR! stack Error: `gyp` failed with exit code: 1
121 error gyp ERR! stack     at ChildProcess.onCpExit (/mnt/c/Git/AradiabotJS/node_modules/node-gyp/lib/configure.js:259:16)
121 error gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
121 error gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
121 error gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
121 error gyp ERR! command "/home/wych/.nvm/versions/node/v18.1.0/bin/node" "/mnt/c/Git/AradiabotJS/node_modules/.bin/node-gyp" "rebuild"
121 error gyp ERR! cwd /mnt/c/Git/AradiabotJS/node_modules/@vscode/sqlite3
121 error gyp ERR! node -v v18.1.0
121 error gyp ERR! node-gyp -v v8.4.1
121 error gyp ERR! not ok
122 verbose exit 1
123 timing npm Completed in 15375ms
124 verbose unfinished npm timer reify 1658343658370
125 verbose unfinished npm timer reify:build 1658343663380
126 verbose unfinished npm timer build 1658343663380
127 verbose unfinished npm timer build:deps 1658343663380
128 verbose unfinished npm timer build:run:install 1658343663394
129 verbose unfinished npm timer build:run:install:node_modules/@vscode/sqlite3 1658343663394
130 verbose code 1
131 error A complete log of this run can be found in:
131 error     /home/wych/.npm/_logs/2022-07-20T19_00_58_303Z-debug-0.log

Can you try to install build-essentials and run it again?