From 3f14057992de60bccbeb16be998fb848c7dca50d Mon Sep 17 00:00:00 2001 From: curium Date: Tue, 11 May 2021 14:23:29 -0600 Subject: [PATCH] fix(resource/yarn) prevent yarn from building resources managed by npm --- resources/[system]/[builders]/yarn/yarn_builder.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/[system]/[builders]/yarn/yarn_builder.js b/resources/[system]/[builders]/yarn/yarn_builder.js index c5db7ecda..4ea0e17ce 100644 --- a/resources/[system]/[builders]/yarn/yarn_builder.js +++ b/resources/[system]/[builders]/yarn/yarn_builder.js @@ -10,6 +10,15 @@ const yarnBuildTask = { shouldBuild(resourceName) { try { const resourcePath = GetResourcePath(resourceName); + + const packageJsonLock = path.resolve(resourcePath, 'package-lock.json'); + try { + if (fs.existsSync(packageJsonLock)) { + return false + } + } catch (e) { + + } const packageJson = path.resolve(resourcePath, 'package.json'); const yarnLock = path.resolve(resourcePath, '.yarn.installed');