Install and Set up Mongoose Express Error

Hi,

Here to report a potential issue and I am hoping to be replied if I am correct or not. I am trying the Install and Set Up Mongoose challenge but it returns the following error code:

Error: Cannot find module 'express'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/runner/boilerplate-mongomongoose/server.js:6:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fcc-mongo-mongoose-challenges@0.0.1 start: `node server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the fcc-mongo-mongoose-challenges@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-02-13T09_26_11_038Z-debug.log

I think it has something to do with the server.js which we are not suppose to modify?

Hello @kwan19961217 ,

I have moved your reply to its own topic, as it is not related to the thread you posted in.

That error is saying that express is not installed. Sometimes, Repl does not automatically install the packages on a new project. So, you need to do it by running npm install within the shell terminal of your Repl.

Hope this clarifies.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.