yarn时碰见的问题:
error @typescript-eslint/eslint-plugin@5.11.0: The engine “node” is incompatible with this module. Expected version “^12.22.0 || ^14.17.0 || >=16.0.0”. Got “12.19.0”
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
执行命令:
yarn config set ignore-engines true
以下是mac系统:
安装node版本管理n
sudo npm install -g n
node -v 查看node版本
sudo n latest 安装最新版本 【注意:网速慢安装会有点久】
sudo n stable 安装稳定版本
sudo n rm x.x.x 删除某个版本 【注意:如果已经安装过node,最好实用node-v查看对应版本,并且rm删除对应的版本后在重新添加,否则可能会安装指定版本冲突错误】
Sudo n //切换版本
参考:
https://segmentfault.com/a/1190000039876888?utm_source=sf-similar-article