yarn install报错The engine "node" is incompatible with this module
yarn install报错The engine "node" is incompatible with this module.可通过键配置中的ignore-engines设置为true来解决
yarn install
时出现跑错:
error chalk@4.0.0: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.10.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
看这个报错提示,是因为node
版本不匹配。这时候只需要将yarn
的配置中的ignore-engines
设置为true
即可。
root@wuyu_ubuntu:/var/www/xhserp# yarn config set ignore-engines true
yarn config v1.19.1
success Set "ignore-engines" to "true".
Done in 0.09s.
这时候我们用yarn config list即可看到ignore-engines
配置项的值已改为true
root@wuyu_ubuntu:/var/www/xhserp# yarn config list
yarn config v1.19.1
info yarn config
{ 'version-tag-prefix': 'v',
'version-git-tag': true,
'version-commit-hooks': true,
'version-git-sign': false,
'version-git-message': 'v%s',
'init-version': '1.0.0',
'init-license': 'MIT',
'save-prefix': '^',
'bin-links': false,
'ignore-scripts': false,
'ignore-optional': false,
registry: 'http://registry.npm.taobao.org/',
'strict-ssl': true,
'user-agent': 'yarn/1.19.1 npm/? node/v8.10.0 linux x64',
'ignore-engines': true,
lastUpdateCheck: 1590147780562 }
info npm config
{ 'unsafe-perm': true,
proxy: null }
Done in 0.09s.
评论啦~
暂无评论,快来抢沙发吧!