Hey I run a discord bot when all of a sudden 2 weeks ago it threw this error
internal/modules/cjs/loader.js:550
11:11 PM
throw err;
11:11 PM
^
11:11 PM11:11 PM
Error: Cannot find module ‘ws’
11:11 PM
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
I tried updating my NPM with npm install but i get this error
npm WARN deprecated [email protected]: use node-fetch instead
npm WARN checkPermissions Missing write access to /app/node_modules/@discordjs
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! path /app/node_modules/@discordjs
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/app/node_modules/@discordjs’
npm ERR! { Error: EACCES: permission denied, access ‘/app/node_modules/@discordjs’
npm ERR! stack: ‘Error: EACCES: permission denied, access ‘/app/node_modules/@discordjs’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/app/node_modules/@discordjs’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
Yes i’ve tried running it with “sudo” infront of it. Its annoying because this bot handles all the admin work in my server…