无法找到 npm react 的版本。

huangapple go评论62阅读模式
英文:

unable to find version npm react

问题

以下是错误信息,

无法解析依赖树
npm ERR! 找到: react-dnd@9.5.1
npm ERR! node_modules/react-dnd
npm ERR!   react-dnd@^9.4.0 来自根项目
npm ERR!
npm ERR! 无法解析依赖:
npm ERR! peer react-dnd@">= 2.0.0 < 3.0.0" 来自 reactabular-dnd@8.16.0

以下是我正在使用的包,

"reactabular-dnd": "^8.16.0",
"react-dnd": "^9.4.0",

有人可以帮助我吗?它说 reactabular-dnd@8.16.0 需要 react-dnd 版本小于 3,但我需要最新的 react-dnd。

英文:

below is the error,

unable to resolve dependency tree
npm ERR! Found: react-dnd@9.5.1
npm ERR! node_modules/react-dnd
npm ERR!   react-dnd@&quot;^9.4.0&quot; from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-dnd@&quot;&gt;= 2.0.0 &lt; 3.0.0&quot; from reactabular-dnd@8.16.0

below are the pacakges am using,

  &quot;reactabular-dnd&quot;: &quot;^8.16.0&quot;,
  &quot;react-dnd&quot;: &quot;^9.4.0&quot;,

Can anyone help me with this? it says reactabular-dnd@8.16.0 requires react-dnd version less than 3 but i require latest react-dnd too

答案1

得分: 1

reactabular-dnd这个库已经相当过时(最后一次发布是4年前),需要一个低于&lt; 3.0.0react-dnd版本。而你的react-dnd版本是9.4.0,明显高于所需版本。

降级react-dnd可能会起作用,但这可能不是你想要的。通过使用npm install --legacy-peer-deps来安装,可以忽略这个错误,也许reactabular-dnd会在较新版本的react-dnd上正常工作。你也可以尝试overrides

英文:

reactabular-dnd which is pretty outdated (last publish 4 years ago) requires a react-dnd version below &lt; 3.0.0. Yours is at 9.4.0 way above what's required.

Downgrading react-dnd would work, but this is not what you want. Installing with npm install --legacy-peer-deps should ignore the error and possibly reactabular-dnd will just work fine with a newer version of react-dnd. You can also try overrides.

huangapple
  • 本文由 发表于 2023年2月10日 03:05:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/75403295.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定