Help Plss | better-sqlite3 Error

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/4adf6d1c-ed9a-49a0-89ee-647798fd1e2b/node_modules/
    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)

Hi, I got a better-sqlite3 error. I’ve reinstalled the package.json but couldn’t help the solution.

MOD EDIT: formatting



Hey @ByLeonS, welcome to the Glitch forum!

This may have something to do with the way your package.json file is configured. Can you provide the contents of that file, or the name of your project, and someone can take a look?



Project Name: bleed
Project Link:!/join/***

Thanks :slight_smile:

MOD EDIT: removed join link



Thanks for the project name! In this case it’s likely that your problem is being caused by line 100 of your package.json, where you call out Node as a dependency. If you require a specific version of Node you should call that out in the engines tag (line 12). Adding Node as a dependency can make pnpm go off into a spiral of recursiveness that can cause breakage like this.

Hope this helps!

1 Like


Thanks @cori :heart:

1 Like