From da1c2974e2fc48ff7a83df9df67992cf30962c62 Mon Sep 17 00:00:00 2001 From: Duc Nghiem Xuan Date: Thu, 24 Nov 2022 20:15:20 +0900 Subject: [PATCH] fix resolveYarn error on yarn version >= 2 (#410) --- src/utils/resolver.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/resolver.ts b/src/utils/resolver.ts index e41f78f..6c3fee4 100644 --- a/src/utils/resolver.ts +++ b/src/utils/resolver.ts @@ -66,6 +66,10 @@ export class Resolver { let exists = fs.existsSync(folder) if (exists) this._yarnFolder = folder return exists ? folder : '' + }).catch(() => { + // yarn global had been removed since version 2 + // if yarn global dir return error then its version >=2, just return empty + return '' }) }