I'm unable to install sqlite3 with npm tool in an Ubuntu 22.04 virtualbox vm.
output in the terminal
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-08-16T14_56_11_203Z-debug-0.log
here is the log (part of it)
595 timing build:link Completed in 11ms
596 info run sqlite3@5.0.11 install node_modules/sqlite3 node-pre-gyp install --fallback-to-build
597 info run sqlite3@5.0.11 install { code: 1, signal: null }
598 timing reify:rollback:createSparse Completed in 479ms
599 timing reify:rollback:retireShallow Completed in 1ms
600 timing command:install Completed in 3347ms
601 verbose stack Error: command failed
601 verbose stack at ChildProcess.<anonymous> (/snap/node/6488/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
601 verbose stack at ChildProcess.emit (node:events:527:28)
601 verbose stack at maybeClose (node:internal/child_process:1092:16)
601 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
602 verbose pkgid sqlite3@5.0.11
603 verbose cwd /home/ivan/raspberry/weather_server
604 verbose Linux 5.15.0-46-generic
605 verbose node v16.16.0
606 verbose npm v8.11.0
607 error code 1
608 error path /home/ivan/raspberry/weather_server/node_modules/sqlite3
609 error command failed
610 error command sh -c node-pre-gyp install --fallback-to-build
611 verbose exit 1
612 timing npm Completed in 3504ms
613 verbose unfinished npm timer reify 1660661328056
614 verbose unfinished npm timer reify:build 1660661330471
615 verbose unfinished npm timer build 1660661330472
616 verbose unfinished npm timer build:deps 1660661330473
617 verbose unfinished npm timer build:run:install 1660661330509
618 verbose unfinished npm timer build:run:install:node_modules/sqlite3 1660661330509
619 verbose code 1
620 error A complete log of this run can be found in:
620 error /home/ivan/.npm/_logs/2022-08-16T14_48_47_915Z-debug-0.log
tried many things found in SO so far
cleared cache
setup python3 path by issuing this command npm install --build-from-source --python=/usr/bin/python2
but nothing helps