From 2aa1c0963788b2967fa423b216deffafb19db116 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 16 Jul 2024 12:34:09 +0200 Subject: [PATCH] fix: fix error due to import json attribute (and deactivate storybook version check) --- packages/nuxt-module/src/storybook.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/nuxt-module/src/storybook.ts b/packages/nuxt-module/src/storybook.ts index 4f3cf26e..3a391f90 100644 --- a/packages/nuxt-module/src/storybook.ts +++ b/packages/nuxt-module/src/storybook.ts @@ -4,12 +4,8 @@ import { getPort } from 'get-port-please' import type { ModuleOptions } from './module' import { withTrailingSlash } from 'ufo' import { colors, logger } from './logger' -import { - cache as storybookCache, - type PackageJson, -} from '@storybook/core-common' +import { cache as storybookCache } from '@storybook/core-common' import { buildDevStandalone, withTelemetry } from '@storybook/core-server' -import storybookPackageJson from '@storybook/core-server/package.json' with { type: 'json' } const buildLogger = logger.withTag('build') @@ -57,7 +53,10 @@ export async function setupStorybook(options: ModuleOptions, nuxt: Nuxt) { configDir: resolve(projectDir, './.storybook'), configType: 'DEVELOPMENT', cache: storybookCache, - packageJson: storybookPackageJson as PackageJson, + packageJson: { version: '8.2.2' }, + // Don't check for storybook updates (we're using the latest version) + versionUpdates: false, + quiet: options.logLevel < 4, // 4 = debug } satisfies Parameters[0] if (!nuxt.options.dev) return