我也是这个问题,找了很久,官方例子都这么不靠谱吗?官方直接都不试试??
如何解决首次clone微信小程序示例demo后执行npm i报错问题?第一步:我在github上clone https://github.com/wechat-miniprogram/miniprogram-demo.git微信实例小程序实例demo 第二步:我进入F:\pytestdemo\mini-wechat-demo\miniprogram-demo-master文件夹后执行npm i命令,报错如下: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: miniprogram-demo@1.0.0 npm ERR! Found: eslint@7.32.0 npm ERR! node_modules/eslint npm ERR! dev eslint@"^7.1.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer eslint@"^4.19.1 || ^5.3.0" from eslint-config-airbnb-base@13.1.0 npm ERR! node_modules/eslint-config-airbnb-base npm ERR! dev eslint-config-airbnb-base@"13.1.0" from the root project 于是我在package.json中更改了eslint为 ^5.3.0,再次执行npm i命令,遇到报错如下: npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tencent%2feslint-config-wxapp - Not found npm ERR! 404 npm ERR! 404 '@tencent/eslint-config-wxapp@^0.5.2' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. 现在的问题是:在https://registry.npmjs.org中未找到@tencent%2feslint-config-wxapp包,请问该如何避免该问题,或者使用其它安装源,但我并不知道具体的url路径进行安装,目前gpt给出的解决方式是让我重新安装指定包:npm install @tencent/eslint-config-wxapp@0.5.2,但目前没有这个包,请问可以用其它版本吗?大家可以提些建议和解决方式吗?
2024-12-27