When you enter the command NPM start
to start the project, sometimes you will encounter such Error Error: Cannot find module ‘mongoose’, missing the module mongoose
.
Error: Cannot find module 'mongoose'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (D:\loginproject\routes\index.js:3:16)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\nodejs\node_cache\_logs\2019-01-09T01_53_44_235Z-debug.log
The solution at this point is to install the missing module:
npm install mongoose
Run successfully, open the browser to enter the access address, you can see the project.
Girl when she was the original author: qi technology blog: https://www.jianshu.com/u/05f416aefbe1
90 front after sister, love programming, love, love.
stick to summarize the technical problems encountered in the work, keep a record of what you think and see in the work, for the blog above there are no questions, you can join the qq group to ask me: 473819131.
Read More:
- NPM- Cannot find module ‘xxxxx’
- Module build failed: error: cannot find module ‘node sass’ error
- Error: Cannot find module ‘process-nextick-args’
- Gulp Error: Cannot find module ‘jshint/src/cli’;
- [Solved] Error: Cannot find module ‘webpack/lib/RequestShortener’
- Solved – problem cannot find module ‘webpack / bin / config yargs’
- Error reported after moving or copying Vue items: cannot find module ‘xxx‘
- Node.js Cannot find module ‘mysql’ ‘express’
- Error: cannot find module ‘node sass’
- Cannot find module ‘internal / util / types’ appears during gulp build
- nodejs Error: Cannot find module ‘ejs‘
- Error: Cannot find module’webpack/bin/config-yargs’ solution
- Error: cannot find module HTTP errors
- Perfectly solve the problem of NPM start error: cannot find module ‘XX’
- Error: Cannot find module ‘webpack/schemas/WebpackOptions.json’
- Solution to electron error “cannot find module app”
- Copy node causes NPM execution error: cannot find module ‘/ / lib / utils/ unsupported.js ‘
- Cannot find module ‘lodash’
- node.js Cannot find module “XXX” solution
- Cannot find module ‘body-parser’