From 20413ad5db1d0973e7f63f55eb8a6b881b3d0474 Mon Sep 17 00:00:00 2001 From: Sidhartha Chatterjee Date: Mon, 28 Oct 2019 21:26:51 +0530 Subject: [PATCH] Default to no dependencies before running diff --- packages/gatsby-dev-cli/src/utils/check-deps-changes.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/gatsby-dev-cli/src/utils/check-deps-changes.js b/packages/gatsby-dev-cli/src/utils/check-deps-changes.js index b2fb3b1253fab..ed742eb068aca 100644 --- a/packages/gatsby-dev-cli/src/utils/check-deps-changes.js +++ b/packages/gatsby-dev-cli/src/utils/check-deps-changes.js @@ -103,6 +103,9 @@ exports.checkDepsChanges = async ({ } } + if (!monorepoPKGjson.dependencies) monorepoPKGjson.dependencies = {} + if (!localPKGjson.dependencies) localPKGjson.dependencies = {} + const areDepsEqual = _.isEqual( monorepoPKGjson.dependencies, localPKGjson.dependencies