unable to install version 11+ on Windows
I get the following errors when installing version 11 on WIndows in a clean project, version 10 installs just fine;
log
$ npm init -y && npm i better-sqlite3@latestWrote to D:\Data\Desktop\sqlite test\test\package.json:
{ "name": "test", "version": "1.0.0", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "description": "" }
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup 'D:\Data\Desktop\sqlite test\test\node_modules',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\Data\Desktop\sqlite test\test\node_modules\tar-fs\test\fixtures\b'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'D:\Data\Desktop\sqlite test\test\node_modules\tar-fs\test\fixtures\b'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path D:\Data\Desktop\sqlite test\test\node_modules\better-sqlite3
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild --release
npm error prebuild-install warn install No prebuilt binaries found (target=21.6.2 runtime=node arch=x64 libc= platform=win32)
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info find Python using Python version 3.12.4 found at "C:\Users\Bart Cuijpers\AppData\Local\Programs\Python\Python312\python.exe"
npm error gyp ERR! find VS
npm error gyp ERR! find VS msvs_version not set from command line or npm config
npm error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
npm error gyp ERR! find VS
npm error gyp ERR! find VS Failure details: undefined
npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
npm error gyp ERR! find VS
npm error gyp ERR! find VS Failure details: undefined
npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
npm error gyp ERR! find VS
npm error gyp ERR! find VS Failure details: undefined
npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
npm error gyp ERR! find VS
npm error gyp ERR! find VS Failure details: undefined
npm error gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm error gyp ERR! find VS
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS You need to install the latest version of Visual Studio
npm error gyp ERR! find VS including the "Desktop development with C++" workload.
npm error gyp ERR! find VS For more information consult the documentation at:
npm error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm error gyp ERR! stack at VisualStudioFinder.fail (C:\Users\Bart Cuijpers\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:116:11)
npm error gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\Bart Cuijpers\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:72:17)
npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm error gyp ERR! stack at async createBuildDir (C:\Users\Bart Cuijpers\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:95:26)
npm error gyp ERR! stack at async run (C:\Users\Bart Cuijpers\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
npm error gyp ERR! System Windows_NT 10.0.22631
npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Bart Cuijpers\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
npm error gyp ERR! cwd D:\Data\Desktop\sqlite test\test\node_modules\better-sqlite3
npm error gyp ERR! node -v v21.6.2
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: C:\Users\Bart Cuijpers\AppData\Local\npm-cache_logs\2024-06-30T07_41_27_745Z-debug-0.log
- Node.js 21 had its end-of-life about a month ago, that's why there are no prebuilds. So use a supported Node.js version
- If you need to compile yourself, the error message could not be clearer:
npm error gyp ERR! find VS npm error gyp ERR! find VS ************************************************************** npm error gyp ERR! find VS You need to install the latest version of Visual Studio npm error gyp ERR! find VS including the "Desktop development with C++" workload. npm error gyp ERR! find VS For more information consult the documentation at: npm error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm error gyp ERR! find VS ************************************************************** npm error gyp ERR! find VS
Also documented here: https://github.com/WiseLibs/better-sqlite3/blob/master/docs/troubleshooting.md#install-the-necessary-tools