Error when install the better-sqlite3
I install the content and it ask me for the better-sqlite3. It try to install the better-sqlite3 but the next error appear...
>npm install better-sqlite3
The system cannot find the drive specified.
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup '[project_path]\\node_modules\\tar-fs',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir '[project_path]\node_modules\tar-fs\test\fixtures\b\a'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: '[project_path]\\node_modules\\tar-fs\\test\\fixtures\\b\\a'
npm warn cleanup }
npm warn cleanup ],
npm warn cleanup [
npm warn cleanup '[project_path]\\node_modules\\bl',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir '[project_path]\node_modules\bl\node_modules\readable-stream'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: '[project_path]\\node_modules\\bl\\node_modules\\readable-stream'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path [project_path]\node_modules\better-sqlite3
npm error command failed
npm error command powershell -c prebuild-install || node-gyp rebuild --release
npm error At line:1 char:18
npm error + prebuild-install || node-gyp rebuild --release
npm error + ~~
npm error The token '||' is not a valid statement separator in this version.
npm error + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
npm error + FullyQualifiedErrorId : InvalidEndOfLine
npm error A complete log of this run can be found in: C:\Users\[user]AppData\Local\npm-cache\_logs\2025-10-09T18_35_06_145Z-debug-0.log
- Were you running the
devcommand while installing? Try installing thebetter-sqlite3dependency without running the dev server. - You can also try manually removing your
node_modulesfolder and then running the install command again.
If neither of these solutions works, please provide more details for reproduction, such as your npm version, operating system, and other environment information.
hope that may help you.😊
Unfortunately I'm not experiences in windows and I don't have a solution for this. This is not related to module, but how node is configured in your system and how it tries to install native bundle of better-sqlite3
If you are using node v22.5.0+, try enabling native connector to use node's native sqlite adapter. With Node's native adapter you don't need better-sqlite3 package anymore.
Checkout: https://content.nuxt.com/docs/getting-started/configuration#experimentalsqliteconnector