Discord.js please help me


module.js:550

3:54 PM

throw err;

3:54 PM

^

3:54 PM

3:54 PM

Error: Cannot find module ‘…/build/Release/canvas.node’

3:54 PM

at Function.Module._resolveFilename (module.js:548:15)

3:54 PM

at Function.Module._load (module.js:475:25)

3:54 PM

at Module.require (module.js:597:17)

3:54 PM

at require (internal/module.js:11:18)

3:54 PM

at Object. (/rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/canvas/lib/bindings.js:3:18)

3:54 PM

at Module._compile (module.js:653:30)

3:54 PM

at Object.Module._extensions…js (module.js:664:10)

3:54 PM

at Module.load (module.js:566:32)

3:54 PM

at tryModuleLoad (module.js:506:12)

3:54 PM

at Function.Module._load (module.js:498:3)

3:54 PM

Hey @Mohamedamine2005,

Look in the Modules.js file and at line 550 replace this:

…/build/Release/canvas.node

With This ‘../build/Release/canvas.node

Hope This Helps! :grinning:

1 Like

This is most likely caused by you not having the “canvas” package installed, could you please try the following steps and it may fix your issue!

  • Open package.json
  • Go to the top left and click Add Package
  • In the search bar, enter canvas
  • Once canvas shows up, click on it and it will automatically install!

Tell me if that works, if not let me know!

2 Likes

@MrDiamond64, the Module.js file is not actually his, its part of the node package manager which is used to load packages when running a node project, since the package was installed incorrectly, not installed at all, or installed in a different location to where node looks, it gave that error!

1 Like

so basically reinstall the canvas module

1 Like