Better-sqlite3 error

module.js:550

throw err;

^

Error: Cannot find module '../build/better_sqlite3.node'


at Function.Module._resolveFilename (module.js:548:15)

at Function.Module._load (module.js:475:25)

at Module.require (module.js:597:17)

at require (internal/module.js:11:18)

at Object.<anonymous> (/rbd/pnpm-volume/f78c55a0-a3fc-48b5-b884-a64e9c7067e1/node_modules/.registry.npmjs.org/better-sqlite3/5.4.0/node_modules/better-sqlite3/lib/database.js:5:21)

at Module._compile (module.js:653:30)

at Object.Module._extensions..js (module.js:664:10)

at Module.load (module.js:566:32)

at tryModuleLoad (module.js:506:12)

at Function.Module._load (module.js:498:3)

i am getting this error pnpm i better-sqlite3 doesnt work

Hello @RobinSchapendonk

Can you provide us with your package.json?

i am now on mobile but here is the screenshot

Ok, @RobinSchapendonk

Can you please go to your projects console and type enable-pnpm and tell me if that works!

4 Likes

i am now on mobile so i cant do it now but i’ll do it tomorrow then i can go on my pc

1 Like

it works now thanks you

1 Like

Great, Can you make sure to mark the answer I gave you so others can easily find the solution if they ever have the same problem.