Error: Cannot find module '../build/Release/canvas.node'

module.js:550
throw err;
^
Error: Cannot find module '../build/Release/canvas.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/a44ad484-707e-4182-a0f8-92793e5c2a86/node_modules/.registry.npmjs.org/canvas/2.3.1/node_modules/canvas/lib/bindings.js:3:18)
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)

MOD EDIT: formatting

Verify that you have installed all npms correctly, or if any are missing.

Hey @irfan424 my guess is that this has to do with how you’re requiring that module, but I’d need to take a look at your project to know for sure - you’d need to provide your project name if you want someone to do that.

@abstract’s comment is also valid - if you run pnpm install -v in your project’s console you might see some errors that you’re not seeing in the logs pane.

If you want to see the project name, everything is correct.

ddiscordbots-list proje

One problem, at least, is that you’re including node in your package.json dependencies. That’s causing the install to fail partway through, so that may be contributing to the error you’re seeing. I suggest fixing that and seeing where that gets you.

how do you suggest ?

Try to do as in this project: glitch.com/~discordbot-example

copy package.json alsam olurmu ?

Sorry if I wasn’t clear enough.

node shouldn’t be in the dependency list - it’s handled by the engine portion of the package.json file. Including it as a dependency make Glitch try to install it in like it’s an npm package, which it’s not.

If you remove that line from your package.json file and do a fresh install that particular error will go away. That will either let the install to proceed normally or will reveal the next layer of errors. You might need to trigger a reinstall (enable-pnpm in the console forces this) to clear things up.

enable-pnpm yaptım 10 kere olmadı ama :frowning:

@cori i have this problem too Project Name : lossrax

Hey @SefaAlbr1, welcome to the Glitch forum! Have you tried running enable-pnpm in the console?

change node engine version 10.x to 8.x then it will work fine :blush: