完整错误提示:
错误分析:这句警告意思是module文件夹中没有express框架相关依赖包。
解决方案:只需要运行命令自行安装express依赖包即可。
PS D:\WEB前端\案例\前端工程化:ES6模块化和webpack打包\webpack_study> npm install express npm WARN webpack_study@1.0.0 No description npm WARN webpack_study@1.0.0 No repository field. + express@4.17.1 added 50 packages from 37 contributors in 2.751s
成功运行:
PS D:\WEB前端\案例\前端工程化:ES6模块化和webpack打包\webpack_study> nodemon .\app.js [nodemon] 2.0.7 [nodemon] to restart at any time, enter `rs` [nodemon] watching path(s): *.* [nodemon] watching extensions: js,mjs,json [nodemon] starting `node .\app.js` 服务器连接!