This is not a trivial task, however, and requires a more comprehensive update to dependencies.
Not surprisingly, just updating @storybook/core in app/aem results in errors when running yarn build
@storybook/aem-cli: src/cmds/content/contentFromStories.ts(14,31): error TS2339: Property 'ok' does not exist on type 'void | Response'.
@storybook/aem-cli: Property 'ok' does not exist on type 'void'.
@storybook/aem-cli: src/cmds/content/contentFromStories.ts(15,46): error TS2339: Property 'json' does not exist on type 'void | Response'.
@storybook/aem-cli: Property 'json' does not exist on type 'void'.
@storybook/aem-cli: src/cmds/content/contentFromStories.ts(27,32): error TS2339: Property 'status' does not exist on type 'void | Response'.
@storybook/aem-cli: Property 'status' does not exist on type 'void'.
@storybook/aem-cli: src/utils/createPage.ts(10,22): error TS2339: Property 'ok' does not exist on type 'void | Response'.
@storybook/aem-cli: Property 'ok' does not exist on type 'void'.
@storybook/aem-cli: src/utils/createPageJCRContent.ts(17,22): error TS2339: Property 'ok' does not exist on type 'void | Response'.
@storybook/aem-cli: Property 'ok' does not exist on type 'void'.
@storybook/aem-cli: src/utils/createStories.ts(47,31): error TS2339: Property 'ok' does not exist on type 'void | Response'.
@storybook/aem-cli: Property 'ok' does not exist on type 'void'.
@storybook/aem: src/client/preview/index.ts(23,19): error TS2345: Argument of type '({ storyFn, selectedKind, selectedStory, showMain, showError, forceRender, }: RenderMainArgs) => Promise<void>' is not assignable to parameter of type 'RenderStoryFunction'.
@storybook/aem: Types of parameters '__0' and 'context' are incompatible.
@storybook/aem: Type 'RenderContext' is missing the following properties from type 'RenderMainArgs': selectedKind, selectedStory
@storybook/aem: src/client/preview/index.ts(31,86): error TS2556: Expected 3-4 arguments, but got 1 or more.
@storybook/aem: src/client/preview/index.ts(32,14): error TS2322: Type '(decorator: DecoratorFunction<unknown>) => void' is not assignable to type '(decorator: DecoratorFunction<StoryFnAemReturnType>) => StoryApi<StoryFnAemReturnType>'.
@storybook/aem: Types of parameters 'decorator' and 'decorator' are incompatible.
@storybook/aem: Types of parameters 'fn' and 'fn' are incompatible.
@storybook/aem: Type 'PartialStoryFn<unknown>' is not assignable to type 'StoryFn<StoryFnAemReturnType>'.
@storybook/aem: Types of parameters 'p' and 'p' are incompatible.
@storybook/aem: Type 'StoryContext' is not assignable to type 'Partial<StoryContext>'.
@storybook/aem: The types of 'hooks.currentContext' are incompatible between these types.
@storybook/aem: Type 'import("/Users/dmckinnon/Documents/GitHub/aem/node_modules/@storybook/addons/dist/types").StoryContext' is not assignable to type 'import("/Users/dmckinnon/Documents/GitHub/aem/node_modules/@storybook/core-client/node_modules/@storybook/addons/dist/ts3.9/types").StoryContext'.
@storybook/aem: Type 'StoryContext' is missing the following properties from type '{ [key: string]: any; parameters: Parameters; args: Args; argTypes: ArgTypes; globals: Args; hooks?: HooksContext; viewMode?: ViewMode; originalStoryFn?: ArgsStoryFn<...>; }': args, argTypes, globals
@storybook/aem: src/client/preview/index.ts(33,14): error TS2322: Type '(parameters: Parameters) => void' is not assignable to type '(parameter: Parameters) => StoryApi<StoryFnAemReturnType>'.
@storybook/aem: Type 'void' is not assignable to type 'StoryApi<StoryFnAemReturnType>'.
storybook/aem currently uses storybook v6.0.0-alpha.2
It would be preferable to use the latest v6.* release (https://github.com/storybookjs/storybook/releases/tag/v6.3.4)
This is not a trivial task, however, and requires a more comprehensive update to dependencies.
Not surprisingly, just updating @storybook/core in app/aem results in errors when running
yarn build
Which results in a broken build