Better-sqlite3 error

javascript
#1
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

#2

Hello @RobinSchapendonkGame

Can you provide us with your package.json?

#3

i am now on mobile but here is the screenshot

#4

Ok, @RobinSchapendonkGame

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

3 Likes
#5

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
#6

it works now thanks you

1 Like
#7

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.