You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error TS2305: Module '"@storybook/nextjs/*"' has no exported member 'Meta'.
error TS2305: Module '"@storybook/nextjs/*"' has no exported member 'StoryObj'.
Does this make sense? This should work as-is, no?
Storybook seems to otherwise work as expected with Typescript (ie. I can run storybook just fine)
Additional information
main.ts
importtype{StorybookConfig}from'@storybook/nextjs';import{join,dirname}from'path';/** * This function is used to resolve the absolute path of a package. * It is needed in projects that use Yarn PnP, pnpm or are set up within a monorepo. */functiongetAbsolutePath(value){returndirname(require.resolve(join(value,'package.json')));}constconfig: StorybookConfig={// Rename this to `stories` later, and rename all the files once 100% converted.stories: ['../src/**/*.story.@(js|jsx|mjs|ts|tsx)'],addons: [getAbsolutePath('@storybook/addon-links'),getAbsolutePath('@storybook/addon-essentials'),getAbsolutePath('@storybook/addon-interactions'),getAbsolutePath('@chromatic-com/storybook'),getAbsolutePath('@storybook/addon-themes'),],framework: {name: getAbsolutePath('@storybook/nextjs'),options: {builder: {},},},staticDirs: ['../public'],docs: {autodocs: 'tag',},};exportdefaultconfig;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Following the documented directions with:
Results in
Does this make sense? This should work as-is, no?
Storybook seems to otherwise work as expected with Typescript (ie. I can run storybook just fine)
Additional information
main.ts
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions