Getting two errors with canvas and better-sqlite3

Hi, I’m getting two errors in my project, and I tried to solve them but nothing works. My project is called ‘trihammer’ and I’m getting the error (with canvas) Error: Cannot find module ‘…/build/Release/canvas.node’, well, I can solve it, but when its solved, another wild error appears, with better-sqlite3 Error: Cannot find module ‘…/build/better_sqlite3.node’. I tried doing enable-pnpm, node-gyp rebuild (but it gives me an error) and deleting the node_modules folder, but none worked.
Thanks in advance.

Try to delete the node_modules folder, to reinstall everything properly.

To do this, go to the terminal of your project via the direct link ( )to your project or by opening the terminal via the tools > terminal button.

Once arrived on your terminal type the following command rm -rf node_modules. This command deletes your node_modules folder, this folder contains all the libraries installed via npm

After executing this command the project will automatically restart and reinstall all the previously installed libraries. You should see something like this in the logs

If nothing happens reinstall your modules with npm install, this has worked for me, I hope it will be the same for you


I tried what you said and now my disk is at 95% so I can’t do anything XD.
git prune and git gc saying that no space left on the device

Have little worries on my part I forgot to mention this fact :pensive:. On my side I did not have a lot of dependencies to install, which reduces the load. I hope you will quickly recover your project

Don’t worry, I could do it in another project and it worked. Thank you.

1 Like