ReactJs将react html表安装到excel时出错



当我试图将react html表安装到excel时,我收到了这个错误。

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: front@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.x.x" from react-html-table-to-excel@2.0.0
npm ERR! node_modules/react-html-table-to-excel
npm ERR!   react-html-table-to-excel@"*" 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 install --save react-html-table-to-excel --legacy-peer-deps

它对我有用!

相关内容

  • 没有找到相关文章

最新更新