From f5a5fac40f33cfb1f720daaddb8702d1ff9ffe1e Mon Sep 17 00:00:00 2001 From: Convly Date: Wed, 6 Sep 2023 17:25:21 +0200 Subject: [PATCH] Ignore diagnostics when generating types from the cli --- .../strapi/lib/commands/actions/ts/generate-types/action.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/strapi/lib/commands/actions/ts/generate-types/action.js b/packages/core/strapi/lib/commands/actions/ts/generate-types/action.js index 922254950f..f298cbcd5d 100644 --- a/packages/core/strapi/lib/commands/actions/ts/generate-types/action.js +++ b/packages/core/strapi/lib/commands/actions/ts/generate-types/action.js @@ -10,7 +10,7 @@ module.exports = async ({ debug, silent, verbose, outDir }) => { process.exit(1); } - const appContext = await strapi.compile(); + const appContext = await strapi.compile({ ignoreDiagnostics: true }); const app = await strapi(appContext).register(); await tsUtils.generators.generate({ @@ -25,5 +25,5 @@ module.exports = async ({ debug, silent, verbose, outDir }) => { artifacts: { contentTypes: true, components: true }, }); - app.destroy(); + await app.destroy(); };