Closed Leungkingman closed 6 years ago
Translation of this issue:
The npm run start (egg-scripts start --daemon --title=egg-server-guzidian) project is started locally on mac. Deployed to the server to perform such an error:
Error: Cannot find module '@mrmlnc/readdir-enhanced' in the error message? ? I did not encounter this error in my previous project deployment with egg1.0, how to solve this? ?
尝试重新安装一下依赖。
cd ${workDir}
rm -rf node_modules/
npm i
报错日志写的很清楚了,你的依赖问题
@atian25 能给出具体的解决方案吗?package.json和我本地开发的一样,安装都是直接执行npm i,安装过程也没有报错。楼上说的哪个方法删除node_nodules然后再执行npm i 也试过了,但还是报这个错
hey, please retry after reinstall dependencies and please never lock it.
$ # reinstall deps and never lock it.
$ rm -rf node_modules yarn.lock package-lock.json
$ npm i --no-package-lock
这个跟 egg 没啥关系,就是你的 node 依赖安装问题,Node 该怎么弄就这么弄
终于找到问题所在,是npm版本的问题,原来的npm版本是5.5.1,升级到5.6.0之后重新npm i 就可以了。哎,搞了我好几个小时
在mac本地执行 npm run start (egg-scripts start --daemon --title=egg-server-guzidian) 项目正常启动。 部署到服务器上执行却报这样的错:
报错信息中的 Error: Cannot find module “@mrmlnc/readdir-enhanced“ 是什么东西?? 我上一个项目用egg1.0部署都没有遇到这个错误,这要怎么解决??