安装报错
QuanchaoSong opened this issue · comments
使用npm安装:
npm install next tarojs-plugin-platform-nextjs
错误如下:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: myApp@1.0.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from next@11.1.4
npm ERR! node_modules/next
npm ERR! next@"*" from the root project
npm ERR! peer next@"^11.1.4" from tarojs-plugin-platform-nextjs@2.0.10
npm ERR! node_modules/tarojs-plugin-platform-nextjs
npm ERR! tarojs-plugin-platform-nextjs@"*" 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! /Users/albus/.npm/_logs/2023-03-29T12_44_12_465Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/albus/.npm/_logs/2023-03-29T12_44_12_465Z-debug-0.log
@QuanchaoSong 这个问题是由于插件 peerDependencies
中的 next
版本为 ^11.1.4
导致的,请先使用 npm install next tarojs-plugin-platform-nextjs --force
命令安装看看是否可以解决。
之后我将修改插件中的 peerDependencies
来解决这个问题。
@QuanchaoSong 我已经解决了该问题,并发布了一个新的版本 2.0.11,请尝试安装该版本看看是否会出现该问题。