升级反馈
作者您好,现在,我一直使用您这个插件,方法也写差不多了,上次我给你反馈安装出现错误后,你对插件进行了升级。但是,我并没有忙于升级,而是用你未升级的版本测试一下,能不能用,经过我的测试,发现是可以用的,我也写了很多方法,socket连接,接收消息,都是没有问题的,
但是,今天,我需要安装一个二维码的库,我安装的时候出现错误提示,提示不能安装,但我看到反馈的错误信息,竟然是和你的这个插件有关,反馈如下:
`npm install qr-image
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/egg
npm ERR! peer egg@"^3.12.0" from [email protected]
npm ERR! node_modules/egg-mock
npm ERR! peerOptional egg-mock@">=5.8.3" from [email protected]
npm ERR! node_modules/egg-bin
npm ERR! dev egg-bin@"^5" from the root project
npm ERR! dev egg-mock@"^5" from the root project
npm ERR! egg@"^3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer egg@"^2.26.0" from [email protected]
npm ERR! node_modules/egg-websocket-plugin
npm ERR! egg-websocket-plugin@"^1.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/egg
npm ERR! peer egg@"^2.26.0" from [email protected]
npm ERR! node_modules/egg-websocket-plugin
npm ERR! egg-websocket-plugin@"^1.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-05-08T02_55_59_318Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-05-08T02_55_59_318Z-debug-0.log`
我想再重新安装一下你更新后的插件,也是类似的提示,安装不上,是不是需要把你的老版本卸载后再进行安装?如果那样的话,会不会影响到我已经写好的控制器方法?所以想先向您咨询一下后再下手
`H:\NodeJSProjects\仿微信\egg-wechat> npm i egg-websocket-plugin --save npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/egg npm ERR! egg@"^3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer egg@"^2.26.0" from [email protected] npm ERR! node_modules/egg-websocket-plugin npm ERR! egg-websocket-plugin@"^1.0.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-05-08T05_13_10_073Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-05-08T05_13_10_073Z-debug-0.log PS H:\NodeJSProjects\仿微信\egg-wechat> npm i egg-websocket-plugin npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/egg npm ERR! egg@"^3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer egg@"^2.26.0" from [email protected] npm ERR! node_modules/egg-websocket-plugin npm ERR! egg-websocket-plugin@"^1.0.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-05-08T05_14_47_724Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-05-08T05_14_47_724Z-debug-0.log`
手动修改一下 package.json 将 egg-websocket-plugin 从 1.0.1 换成 3.0.0-beta.0 再运行
npm install
或
npm install [email protected] --save
试试,看报错并没有用到新的版本
测试成功,按照您的步骤操作: "egg-websocket-plugin": "^3.0.0-beta.0", 经过测试,socket功能完全正常,我原来写好的控制器方法,没有做任何更改,都可以正常使用, 安装完成后,我再接着安装其他插件,也都正常完成了