Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant install sqlite3 for npm #1691

Open
koncumone opened this issue Mar 16, 2023 · 1 comment
Open

cant install sqlite3 for npm #1691

koncumone opened this issue Mar 16, 2023 · 1 comment

Comments

@koncumone
Copy link

Issue Summary

try to install sqlite to my project on windows and get error. But on my ubuntu 18.04 server all done

Relevant logs or output

npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm ERR! code 1
npm ERR! path C:\Users\Admin\Desktop\manager\node_modules\sqlite3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Admin\Desktop\manager\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Admin\Desktop\manager\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 --python=C:\Python311\python.exe' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\Admin\Desktop\manager\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.6/napi-v6-win32-unknown-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error ENOENT: no such file or directory, open 'C:\Users\Admin\Desktop\manager\node_modules\my_cert.pem' 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.2 found at "C:\Python311\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.15.0/node-v18.15.0-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: ENOENT: no such file or directory, open 'C:\Users\Admin\Desktop\manager\node_modules\my_cert.pem'
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\Admin\\Desktop\\manager\\node_modules\\sqlite3\\lib\\binding\\napi-v6-win32-unknown-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\Admin\\Desktop\\manager\\node_modules\\sqlite3\\lib\\binding\\napi-v6-win32-unknown-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6" "--python=C:\\Python311\\python.exe"       
npm ERR! gyp ERR! cwd C:\Users\Admin\Desktop\manager\node_modules\sqlite3
npm ERR! gyp ERR! node -v v18.15.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Admin\Desktop\manager\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Admin\Desktop\manager\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 --python=C:\Python311\python.exe' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Admin\Desktop\manager\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Admin\\Desktop\\manager\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"       
npm ERR! node-pre-gyp ERR! cwd C:\Users\Admin\Desktop\manager\node_modules\sqlite3
npm ERR! node-pre-gyp ERR! node -v v18.15.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-03-16T01_03_57_200Z-debug-0.log`
`

Version

nonde

Node.js Version

18.15.0

How did you install the library?

windows 10

@fcanela
Copy link

fcanela commented Oct 7, 2023

I have created the issue #1721 and I'll be providing more info here for users that may find this in google/etc.

The issue is in node-pre-gyp, which tries to require files that are not declared as a hard dependency but a dev one. There is an issue created with a lot of activity and frustration but as node-pre-gyp is no longer maintained this is not going to be fixed there.

I hope we have info soon about how node-sqlite3 plans to get around this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants