seems to break with pnpm 10+
Environment
- Operating System: Windows_NT
- Node Version: v20.15.0
- Nuxt Version: 3.17.1
- CLI Version: 3.25.0
- Nitro Version: 2.11.11
- Package Manager: [email protected]
- Builder: -
- User Config: future, modules, compatibilityDate, devtools, css, vite, primevue, content, colorMode, eslint
- Runtime Modules: @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @primevue/[email protected], @nuxtjs/[email protected]
- Build Modules: -
Version
3.5.1
Reproduction
update to latest pnpm 10.10.0 delete node_modules & package lock file run pnpm install
you'll see it skipping certain builds
Description
run dev server Now we get errors around bindings
Cannot start nuxt: Could not locate the bindings file. Tried:
..\.pnpm\[email protected]\node_modules\better-sqlite3\build\better_sqlite3.node
...etc
pnpm approve-builds does nothing, because it was short-cuircuited by postinstall
if i remove the postinstall i can then approve the better-sqlite3 build
but pnpm approve-build, only works once ..you have to delete the whole node folder & lock file and start over otherwise ☹️
Additional context
simply using npm install, works fine
saw the problem mentioned here on PNPM https://github.com/pnpm/pnpm/issues/9045
I ran into this, but was able to fix it. Not sure example how. Start by putting this in the pnpm-workspace.yaml to see if it fixees it:
onlyBuiltDependencies:
- better-sqlite3
Then run pnpm rebuild better-sqlite3
Thats what it added when i ran approve-build (after disabling postinstall)
However anyone that has the latest version of pnpm on their pc and initializes a new nuxt project will eventually run into this problem ...and wonder why nuxt does not work
Even more if you get/clone a full project and try to run pnpm install :: its just broken
@farnabaz can you help us?
I've received this error twice now and both times I've been able to solve the problem by running
pnpm approve-builds && pnpm rebuild
And making sure to select better-sqllite3 from the approval list.
Node 24.4.0 Pnpm 10.13.1 Nuxt 3.17.6
I'm running into this issue. I'm on Windows 10, using Powershell. I have added onlyBuiltDependencies to both my package.json and pnpm-workspace.yaml with no success. Running pnpm approve-builds doesn't help either, especially because it doesn't list better-sqlite3 as one of the libraries needing to be built.
I tried on my Linux laptop and having the same issue. I'll try a downgrade of PNPM next.
OS: POP OS 22.04 Node: 24.4.1 PNPM: 10.13.1 Nuxt: ^4.0
The solution to pnpm issue should be simple as removing node_modules and lock files and run pnpm approve-builds after clean install
What I suggest to try experimental native sqlite https://content.nuxt.com/docs/getting-started/configuration#experimentalnativesqlite
By enabling native sqlite, module will not load better-sqlite3 and you don't need to add it to approve builds
The solution to pnpm issue should be simple as removing node_modules and lock files and run
pnpm approve-buildsafter clean install
I tried this and a few permutations without success. I did try your suggestion to use native sqlite and was able to move beyond this issue. Thanks!
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.