部署JetLinks前端时NPM打包时报错
aiyzb@aiyzb-SY-KL-H310CM-VH-V2-0:~/jetlinks-ui-antd$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: jetlinks@1.2.0
npm ERR! Found: antd@3.26.20
npm ERR! node_modules/antd
npm ERR! antd@"^3.26.18" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer antd@"4.x" from @ant-design/pro-layout@4.11.4
npm ERR! node_modules/@ant-design/pro-layout
npm ERR! @ant-design/pro-layout@"^4.11.4" 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 /home/aiyzb/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/aiyzb/.npm/_logs/2022-08-16T03_37_56_169Z-debug-0.log
aiyzb@aiyzb-SY-KL-H310CM-VH-V2-0:~/jetlinks-ui-antd$
我搜了一些说是NPM版本过高造成的,我就卸载NPM 。试着下载7.X版本的NPM,
aiyzb@aiyzb-SY-KL-H310CM-VH-V2-0:~$ sudo apt install npm7.24.1
正在读取软件包列表
正在分析软件包的依赖关系树
正在读取状态信息 完成
E: 无法定位软件包 npm7.24.1
E: 无法按照 glob ‘npm7.24.1’ 找到任何软件包