我一直试图在我的Vdom-Oracle JET
项目中安装react很棒的查询生成器,但我遇到了以下错误。你能帮我解决这个问题吗?
npm i react-awesome-query-builder --save
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vdom-chart-sample@1.0.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! peer react@"^16.8.4 || ^17.0.1 || ^18.0.0" from react-awesome-query-builder@5.3.1
npm ERR! node_modules/react-awesome-query-builder
npm ERR! react-awesome-query-builder@"^5.3.1" from the root project
npm ERR! peer react@">=16.0.0" from @ant-design/icons@4.7.0
npm ERR! node_modules/@ant-design/icons
npm ERR! @ant-design/icons@"^4.7.0" from the root project
npm ERR! peer @ant-design/icons@"^4.0.0" from react-awesome-query-builder@5.3.1
npm ERR! node_modules/react-awesome-query-builder
npm ERR! react-awesome-query-builder@"^5.3.1" from the root project
npm ERR! 4 more (react-dom, @emotion/react, @emotion/styled, @fortawesome/react-fontawesome)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
npm ERR! node_modules/@material-ui/core
npm ERR! peer @material-ui/core@"^4.12.3" from react-awesome-query-builder@5.3.1
npm ERR! node_modules/react-awesome-query-builder
npm ERR! react-awesome-query-builder@"^5.3.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! See C:UsersRence AbishekAppDataLocalnpm-cacheeresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersRence AbishekAppDataLocalnpm-cache_logs2022-09-07T12_45_29_407Z-debug-0.log
注意:如果我尝试使用--force
,它可以正常工作,但我不确定它将来是否会成为问题!
npm install @ukrbublik/react-awesome-query-builder@5.4.0
GitHub 上的参考