Cannot find module express


#1

Greetings!

I’m working on a discord.js Bot and was passing it to your site. I’ve followed all the steps required in https://anidiots.guide/, and managed to fend off the errors so far, except this one:

Error:
internal/modules/cjs/loader.js:582
throw err;
^

Error: Cannot find module ‘express’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/app/express.js:2:17)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)

I’ve taken a look at similar topics, and already did npm i and enable-npm, with no success.


#2

To install packages you need to go to package.json and click the Add Package button at the top, then type the package name and click the result. You need to install express.


#3

Could have sworn I had it added. That did the trick, thank you so much!