node启动服务报错Node.js Error: Cannot find module express
2020-02-03 04:08
1041 查看
在node文件夹中(M:\express-test),执行
npm install express
在使用npm安装express时,报npm WARN saveError ENOENT: no such file or directory, open 'M:\express-test\package.json'错误, 和下面错误一样:
错误原因:项目没有package.json文件导致
解决方案:
使用 npm init -y 生成默认的 package.json 和 package-lock.json 两个文件
转载于:https://www.cnblogs.com/andy-lehhaxm/p/10506543.html
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Error: Cannot find module 'express'
- Windows node.js npm install express -g Cannot find module 'express'
- Error: Cannot find module 'express'
- nodejs express 启动报错:Error: Cannot find module 'xxx'
- 安装express之后,会出现500 Error: Cannot find module 'jade'错误
- 错误处理 Error: Cannot find module 'express'
- Windows node.js npm install express -g Cannot find module 'express'
- Cannot find module `express`
- Cannot find module 'express'
- Windows node.js npm install express -g Cannot find module 'express'
- nodejs express 启动报错:Error: Cannot find module 'xxx'
- Windows node.js npm install express -g Cannot find module 'express'
- Cannot find module 'express'问题处理
- 解决Cannot find module 'express-session'的问题
- Error: Cannot find module 'express'
- React-native Cannot find module 'invariant'
- webpack编译时出现报错Error: Cannot find module '@babel/core'
- 201211288AM-Cannot find hcmCommonPayApplicationModuledefImpl class issue
- vue引入bootstrap.min.css报错:Cannot find module "./assets/css/bootstrap.min.css"
- Cocos2d-x 2.2.3 使用NDK配置安卓编译环境问题之 Cannot find module with tag 'CocosDenshion/android' in import path