Help Plss | better-sqlite3 Error

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

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


MOD EDIT: formatting

0 Likes

#2

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?

0 Likes

#3

Project Name: bleed
Project Link: https://glitch.com/edit/#!/join/***

Thanks :slight_smile:


MOD EDIT: removed join link

0 Likes

#4

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

#5

Thanks @cori :heart:

1 Like