Open baoyadong opened 6 years ago
chokidar@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.2.tgz#4dc65139eeb2714977735b6a35d06e97b494dfd7" integrity sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw== dependencies: anymatch "^2.0.0" async-each "^1.0.0" braces "^2.3.0" glob-parent "^3.1.0" inherits "^2.0.1" is-binary-path "^1.0.0" is-glob "^4.0.0" normalize-path "^2.1.1" path-is-absolute "^1.0.0" readdirp "^2.0.0" upath "^1.0.0" optionalDependencies: fsevents "^1.0.0"
so: rm -rf yarn.lock change package.json "chokidar": "^1.7.0" => "chokidar": "^3.3.1" (chokidar@3.3.1 rely on upath@1.2.0, upath@1.2.0 engine "node": ">=4") then: yarn
本地使用"yarn"命令下载依赖的时候,直接报错:
error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9". error Found incompatible module
后来仔细研究了下,发现是upath版本过低导致,所以直接在 yarn.lock 文件里面找到upath,升级为:
upath "^1.0.5"
解决了无法下载依赖的问题