Error find module I should have

In my project meepmusictest (I give you permisson to go into the code and troubleshoot. I gtg right away.) anyways this happened
Error To Bigโ€ฆ HasteBin Time
followed by looping

internal/modules/cjs/loader.js:550

    throw err;

    ^


Error: Cannot find module 'canvas'

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)

    at Function.Module._load (internal/modules/cjs/loader.js:475:25)

    at Module.require (internal/modules/cjs/loader.js:598:17)

    at require (internal/modules/cjs/helpers.js:11:18)

at Object.<anonymous> (/app/server.js:9:16)

    at Module._compile (internal/modules/cjs/loader.js:654:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)

    at Module.load (internal/modules/cjs/loader.js:566:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)

    at Function.Module._load (internal/modules/cjs/loader.js:498:3)```
it is required in package.json and (p)npm install canvas doesnt work HELP!

Itโ€™s in my package.json and used to work
when I try to reinstall:

$ npm install canvas

> canvas@2.4.1 install /app/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp ERR! Completion callback never invoked! 
node-pre-gyp ERR! System Linux 4.4.0-1066-aws
node-pre-gyp ERR! command "/opt/nvm/versions/node/v9.11.2/bin/node" "/app/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /app/node_modules/canvas
node-pre-gyp ERR! node -v v9.11.2
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>
npm WARN discord.js@11.4.2 requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN enmap@4.8.1 requires a peer of better-sqlite-pool@github:eslachance/better-sqlite-pool but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! canvas@2.4.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 6
npm ERR! 
npm ERR! Failed at the canvas@2.4.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
   โ”‚                                     โ”‚
   โ”‚   Update available 5.6.0 โ†’ 6.9.0    โ”‚
   โ”‚     Run npm i -g npm to update      โ”‚
   โ”‚                                     โ”‚
   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npm-cache/9.11.2/_logs/2019-03-30T01_39_15_937Z-debug.log
app@meepmusictest:~ 01:39 
$ pnpm install canvas
A store server is running. All store manipulations are delegated to it.
Resolving: total 38, reused 23, downloaded 0
Resolving: total 72, reused 72, downloaded 0
Packages: +72
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ERROR  EACCES: permission denied, symlink '../../../detect-libc/1.0.3/node_modules/detect-libc' -> '/rbd/pnpm-volume/c0734d6d-5438-4ccb-9846-3354e3e2606d/node_m
odules/.registry.npmjs.org/node-pre-gyp/0.11.0/node_modules/detect-libc'

edit: added some info that I forgot to put in first place

1 Like

Hey @WilsontheWolf, sorry for the bother. Iโ€™d be happy to take a look but will need your project name to do so.

1 Like

Thanks @cori the name is meepmusictest

1 Like

Hello @cori are you checking on it?

1 Like

Is anyone able to help me?

1 Like

update: I removed all mentions of canvas in the code and it works. However I want canvas so if anyone can help it would be appreciated. Thanks

1 Like

Can you try installing canvas from the top left of your package.json file, there is a box โ€œAdd Packageโ€
click it and type canvas then click it and tell me if that works!

It is already a dependency. I removed and readded it. Restart NPM and PNPM install donโ€™t work. It used to and suddenly stoped working once.

1 Like

Hey @WilsontheWolf Iโ€™ve spent some time digging into this, but Iโ€™m not sure whatโ€™s causing the problem with the node-gyp build process yet. Iโ€™m going to dig a little deeper and see what I can sort out. Sorry for the delay!

1 Like

ok thanks cori. Looking forward to having it fixed

1 Like

update node-opus is also having issues!

1 Like

Any updates on this @cori?

1 Like

It could be a problem with the package itself, not the container.

1 Like