因为这个React项目需要高版本的node,我就通过nvm包管理器,切换node版本为16.18.0
但是在项目中 npm i 时报错.
this command with --force, or --legacy-peer-deps
/*
–legacy-peer-deps标志是在v7中引入的,目的是绕过peerDependency自动安装;
它告诉 NPM 忽略项目中引入的各个modules之间的相同modules但不同版本的问题并继续安装,
保证各个引入的依赖之间对自身所使用的不同版本modules共存
*/
// 你可以通过 npm install --force 或 npm install --legacy-peer-deps