Companion StackBlitz issue to pnpm issues pnpm/pnpm#14018
Describe the bug
pnpm 11 cannot install dependencies in StackBlitz WebContainers because the WebContainers implementation of node:sqlite is missing DatabaseSync methods required by pnpm, including exec().
pnpm 11 replaced the JSON-per-package store index with a SQLite database in Apr 2026:
Link to the blitz that caused the error
https://stackblitz.com/edit/github-fuwsaec6?file=pnpm-workspace.yaml
Steps to reproduce
- Visit the reproduction URL above
- Install pnpm 11 using the StackBlitz workarounds detailed in issue #2149 and observe that pnpm 11 can now print its version
~/projects/github-fuwsaec6
❯ npm install --global --prefix "$HOME/.local" pnpm@11
added 1 package in 3s
1 package is looking for funding
run `npm fund` for details
~/projects/github-fuwsaec6
❯ mkdir -p "$HOME/.config/pnpm"
~/projects/github-fuwsaec6
❯ touch "$HOME/.config/pnpm/config.yaml"
~/projects/github-fuwsaec6
❯ "$HOME/.local/bin/pnpm" --version
11.22.0
- Attempt to install dependencies, and observe that pnpm fails in its SQLite-backed store because
DatabaseSync.exec() is missing 💥
~/projects/github-fuwsaec6
❯ "$HOME/.local/bin/pnpm" install
[ERROR] this.db.exec is not a function
pnpm: this.db.exec is not a function
at StoreIndex.openDatabase (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:102459:17)
at new StoreIndex (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:102445:14)
at createNewStoreController (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:182750:83)
at async installDeps (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:219799:17)
at async Object.handler5 (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:220906:3)
at async eval (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:322605:19)
at async main4 (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:322573:30)
at async runPnpm (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:322869:5)
at async eval (file:///home/.local/lib/node_modules/pnpm/dist/pnpm.mjs:322862:3)
- Inspect the WebContainers
node:sqlite implementation and observe that DatabaseSync.exec() and the other expected prototype methods are missing 💥
~/projects/github-fuwsaec6
❯ node --input-type=module --eval "import * as sqlite from 'node:sqlite'; console.log(Object.keys(sqlite)); const db = new sqlite.DatabaseSync(':memory:'); console.log({ exec: typeof db.exec, methods: Object.getOwnPropertyNames(Object.getPrototypeOf(db)).sort() })"
[ 'DatabaseSync', 'StatementSync', 'backup', 'constants', 'default' ]
{ exec: 'undefined', methods: [ 'constructor' ] }
(node:18) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Expected behavior
pnpm 11 installs dependencies successfully in StackBlitz WebContainers
More generally, WebContainers should support the node:sqlite DatabaseSync methods available in Node.js 22 that pnpm 11 relies on, including exec().
Parity with Local
Screenshots
No response
Platform
- OS: macOS Tahoe 26.5.2 (25F84)
- Browser: Chrome
- Version: 151.0.7922.138 (macOS)
Additional context
Related issues:
cc @SamVerschueren if this should be reported some other way or in stackblitz/core, let me know
Companion StackBlitz issue to pnpm issues pnpm/pnpm#14018
Describe the bug
pnpm 11 cannot install dependencies in StackBlitz WebContainers because the WebContainers implementation of
node:sqliteis missingDatabaseSyncmethods required by pnpm, includingexec().pnpm 11 replaced the JSON-per-package store index with a SQLite database in Apr 2026:
Link to the blitz that caused the error
https://stackblitz.com/edit/github-fuwsaec6?file=pnpm-workspace.yaml
Steps to reproduce
DatabaseSync.exec()is missing 💥node:sqliteimplementation and observe thatDatabaseSync.exec()and the other expected prototype methods are missing 💥Expected behavior
pnpm 11 installs dependencies successfully in StackBlitz WebContainers
More generally, WebContainers should support the
node:sqliteDatabaseSyncmethods available in Node.js 22 that pnpm 11 relies on, includingexec().Parity with Local
Screenshots
No response
Platform
Additional context
Related issues:
cc @SamVerschueren if this should be reported some other way or in
stackblitz/core, let me know