240
世界上有10种人,一种懂二进制,另一种不懂二进制。

How to ignore incompatible engine “node” error on installing npm dependencies with yarn?

1 前言

某项目yarn Install依赖包时,更换各种源都也下载不下来,这两个包是(weinre-2.0.0-pre-I0Z7U9OV.tgz and echarts-4.1.0.tgz ,但是该源上包可以下载下来,但是放到服务器上,不知道其文件夹名称,所以无果。

当设置 yarn config set ignore-engines true后,yarn Install就可以正常拉取下来了。原因大概率在于node版本的兼容性问题。

2 解决方案

$ yarn install --ignore-engines
yarn install v0.24.5
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 1.41s.
$ yarn help | grep -- --ignore
    --ignore-scripts                  don't run lifecycle scripts
    --ignore-platform                 ignore platform checks
    --ignore-engines                  ignore engines check
    --ignore-optional                 ignore optional dependencies

转载:How to ignore incompatible engine “node” error on installing npm dependencies with yarn?

posted @ 2020-09-15 13:56  unionline  阅读(374)  评论(0编辑  收藏  举报