前端包管理工具yarn配置文件和常见问题
配置文件
在 C:\Users\liteng 目录下创建文件 .yarnrc ,填写以下内容:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
registry "https://registry.npmmirror.com"
ELECTRON_MIRROR "https://registry.npmmirror.com/electron"
cache-folder "D:\\temp\\yarn\\cache"
disturl "https://registry.npmmirror.com/node"
global-folder "D:\\temp\\yarn\\global"
prefix "D:\\temp\\yarn"
常见问题
1、(node:23212) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 upgrade listeners added to [Server]. Use emitter.setMaxListeners() to increase limit。
解决方法:
2、yarn install时报错:info There appears to be trouble with your network connection. Retrying...。
解决方法:执行以下代码即可。
yarn cache clean -f3、yarn install报错: error @achrinza/node-ipc@9.2.2: The engine "node" is incompatible with this module. Expected version "8 || 10 || 12 || 14 || 16 || 17". Got "20.10.0"。
yarn install --ignore-engines4、yarn install报错:error commander@12.1.0: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.20.2"。
yarn install --ignore-engines 最后更新于1年前
本文由人工编写,AI优化,转载请注明原文地址: 前端包管理工具yarn配置文件和常见问题
推荐阅读
评论 (0)
发表评论
昵称:加载中...
暂无评论,快来发表第一条评论吧!