diff --git a/packages/pages/src/generate/features/features.ts b/packages/pages/src/generate/features/features.ts index f563fa5cc..0c4fe3534 100644 --- a/packages/pages/src/generate/features/features.ts +++ b/packages/pages/src/generate/features/features.ts @@ -9,7 +9,11 @@ const handler = async ({ scope }: { scope: string }): Promise => { projectStructure.getTemplatePaths() ); - await createTemplatesJson(templateFilepaths, projectStructure, "FEATURES"); + try { + await createTemplatesJson(templateFilepaths, projectStructure, "FEATURES"); + } catch (error) { + console.error(error); + } }; export const featureCommand = (program: Command) => { diff --git a/packages/pages/src/generate/templates/createTemplatesJson.ts b/packages/pages/src/generate/templates/createTemplatesJson.ts index f05b6e98e..4ebf548a3 100644 --- a/packages/pages/src/generate/templates/createTemplatesJson.ts +++ b/packages/pages/src/generate/templates/createTemplatesJson.ts @@ -1,5 +1,5 @@ import fs from "fs-extra"; -import isEqual from "lodash/isEqual"; +import isEqual from "lodash/isEqual.js"; import path from "path"; import { FeaturesConfig, @@ -97,11 +97,10 @@ export const getTemplatesConfig = ( streams.push(streamConfig); continue; } - if (!isEqual(matchingStreamConfig, streamConfig)) { - throw new Error( - "Conflicting configurations found for stream ID ${streamConfig.$id}" - ); + if (isEqual(matchingStreamConfig, streamConfig)) { + continue; } + throw `Conflicting configurations found for stream ID: ${streamConfig.$id}`; } return { features, streams };