nodejs报错:Cannot find module 'ejs'
2018-01-09 14:34
387 查看
错误显示:
Error: Cannot find module 'ejs'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at new View (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\view.js:78:30)
at EventEmitter.render (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\application.js:569:12)
at ServerResponse.render (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\response.js:961:7)
at exports.showIndex (d:\WebClient\webstormSpace\day6shuoshuo\routes\router.js:7:9)
at Layer.handle [as handle_request] (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\router\layer.js:95:5)
at next (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\router\route.js:131:13)
原因:没有安装ejs模块
解决办法:
cmd进入到项目目录,安装ejs:npm install --save ejs
Error: Cannot find module 'ejs'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at new View (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\view.js:78:30)
at EventEmitter.render (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\application.js:569:12)
at ServerResponse.render (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\response.js:961:7)
at exports.showIndex (d:\WebClient\webstormSpace\day6shuoshuo\routes\router.js:7:9)
at Layer.handle [as handle_request] (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\router\layer.js:95:5)
at next (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\router\route.js:131:13)
原因:没有安装ejs模块
解决办法:
cmd进入到项目目录,安装ejs:npm install --save ejs
相关文章推荐
- nodejs报错:Cannot find module 'ejs'
- nodejs报错:Cannot find module 'ejs'
- nodejs中cannot find node module
- [乐意黎]Nodejs采集程序抛Error: Cannot find module 'superagent' 及 Cannot find module 'superagent' 等的解决方法
- node.js报错:Cannot find module 'ejs'的解决办法
- 在Linux下安装nodejs遇到Cannot find module 'npmlog'问题的解决方法
- 【NodeJS】Error: Cannot find module 'ms'
- Error: Cannot find module 'ejs'
- 安装了nodejs后在命令行运行npm报错:Error: Cannot find module 'internal/util/types'
- NodeJS:cannot find module 'socket.io' | nmp全局安装 modules 后在应用中 require 不到的解决方案
- nodeJs启动的时候:Error: Cannot find module '../build/Release/bson'的解决办法
- nodeJs启动的时候:Error: Cannot find module '../build/Release/bson'的解决办法
- Cannot find module with tag 'libjpeg' in import path
- React-Native项目升级后,不能package服务时报错:Cannot find module ‘invariant’
- Cocos2dx 2.0.2版本Android环境出错:Cannot find module with tag 'CocosDenshion/android' in import path
- Error: Cannot find module 'core-js/library/fn/get-iterator'解决方案
- Error: Cannot find module '@angular-devkit/core'
- ERROR in Cannot find module 'node-sass' 找不到 node-sass 模块
- vue 中使用 stylus 报错的解决( Error: Cannot find module 'when')
- Cannot find module 'babel-p 4000 lugin-transform-es2015