Error API DISCORD bot

Hello, i started getting some errors few days ago, and have no idea what could it be. Im coding a discord bot here, is anyone else having that problem?

LOG >
internal/modules/cjs/loader.js:584

8:33 PM

throw err;

8:33 PM

^

8:33 PM

8:33 PM

Error: Cannot find module ‘on-finished’

8:33 PM

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

8:33 PM

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

8:33 PM

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

8:33 PM

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

8:33 PM

at Object. (/rbd/pnpm-volume/521f9420-7a1e-4e88-894c-03aaa488ce45/node_modules/.registry.npmjs.org/finalhandler/1.1.1/node_modules/finalhandler/index.js:17:18)

8:33 PM

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

8:33 PM

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

8:33 PM

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

8:33 PM

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

8:33 PM

at Function.Module._load (internal/modules/cjs/loader.js:531:3)

You need to add the npm module on-finished to your package.json file.

1 Like

Hey @Sprayer,

Are you sure the package on-finished is installed? Go in the terminal and do npm i on-finished, then go to your package.json file and then look for [Add Package] then press the package

1 Like

@charliea21 @MrDiamond64 Thanks! But its strange, because i never had a problem with it until now.

1 Like

I have the same problem but when i installed on-finished it came up with another missing package. I kept installing the missing packages each time until i reached a point when it would not let me install send.

Edit: i found a post saying to run enable-pnpm and it fixed my thing.