Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SongFuZhen/9fad48fa2ed5fe6d8410ce3b18dc572d to your computer and use it in GitHub Desktop.
Save SongFuZhen/9fad48fa2ed5fe6d8410ce3b18dc572d to your computer and use it in GitHub Desktop.

The engine "node" is incompatible with this module

命令行执行: yarn config set ignore-engines true

Yarn 在安装包的时候,会从缓存中取,有时候会导致一些错误

Umi V3中,将umi-plugin-react 修改为 @umijs/preset-react

错误信息:cannot find module "browserslist"

删除了browserslist。在之前的版本中,我们用过 umi-plugin-react,所以导致用了缓存中的内容

此时就报错了,报错为找不到 browserslist

清空 yarn 缓存

# 查看yarn cache 的目录
yarn cache dir

# 清空缓存
yarn cache clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment