node:internal/modules/cjs/loader:942 throw err; ^ Error: Cannot find module 'express' Require stack:

Viewed 6314

I am working on running my express server with the command npm start. I am receiving: ```node:internal/modules/cjs/loader:942 throw err; ^

Error: Cannot find module 'express' Require stack: ```.

I currently do not have node modules and also receive errors when I type the command npm install. I've deleted node modules outside of the current directory, upgraded the version, & have been googling answers. I would appreciate the help. Thanks so much!

1 Answers

You need to install express as the error is showing that express is missing. The command for that shall be npm install express --save. You have also mentioned that you are receiving error upon running npm install .

Updated

Remove bycrypt-nodejs from your package.json file as it is deprecated. Then run npm install. If you need bycrypt you can run npm install bcrypt or npm install bcryptjs which suits your project better. Afterwards run npm install express --save. Hope this will solve the issue.

Related