Open jon9090 opened 2 months ago
import type { StorybookConfig } from '@storybook/angular';
const config: StorybookConfig = {
stories: ['../../../**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', 'storybook-addon-angular-router', "@storybook/addon-docs"],
framework: {
name: '@storybook/angular',
options: { },
},
docs: { /* add this code */
autodocs: true,
},
};
export default config;
i 've solved that problem by adding that code
@kangaroo19 I did:
docs: { /* add this code */
autodocs: true,
},
but it throw an error:
(0 , react__WEBPACK_IMPORTED_MODULE_0__.useContext)(...).componentStoriesFromCSFFile is not a function
TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_0__.useContext)(...).componentStoriesFromCSFFile is not a function
at Primary (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:5836:83)
at Nh (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:38555:7)
at Vk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41737:11)
at Uk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41431:11)
at Tk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41425:23)
at Ik (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41411:5)
at Nk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41134:7)
at Gk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41071:51)
at J (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:42973:17)
at MessagePort.R (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:43004:11)
could you show me your any stories.ts code?
@kangaroo19 I did:
docs: { /* add this code */ autodocs: true, },
but it throw an error:
(0 , react__WEBPACK_IMPORTED_MODULE_0__.useContext)(...).componentStoriesFromCSFFile is not a function TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_0__.useContext)(...).componentStoriesFromCSFFile is not a function at Primary (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:5836:83) at Nh (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:38555:7) at Vk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41737:11) at Uk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41431:11) at Tk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41425:23) at Ik (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41411:5) at Nk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41134:7) at Gk (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:41071:51) at J (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:42973:17) at MessagePort.R (http://localhost:4400/vendors-node_modules_storybook_addon-docs_dist_DocsRenderer-K4EAMTCU_mjs.iframe.bundle.js:43004:11)
the same issue
You have a mix of Storybook 8 and 7 dependencies. Please make sure that all Storybook dependencies are using the same version.
You have a mix of Storybook 8 and 7 dependencies. Please make sure that all Storybook dependencies are using the same version.
no, my dependencies version is 8.1.1 all @valentinpalkovic
"@chromatic-com/storybook": "^1",
"@storybook/addon-essentials": "^8.1.1",
"@storybook/addon-interactions": "^8.1.1",
"@storybook/addon-links": "^8.1.1",
"@storybook/addon-mdx-gfm": "^8.1.1",
"@storybook/blocks": "^8.1.1",
"@storybook/testing-library": "^0.2.2",
"@storybook/vue3": "^8.1.1",
"@storybook/vue3-vite": "^8.1.1",
"storybook": "^8.1.1",
Describe the bug
I utilize Storybook alongside Angular. I've included
@storybook/addon-docs
to showcase the code tab, but it's not rendering in the Storybook UI.What might be causing this issue? Am I overlooking something, or could it be a bug?
package.json:
main.ts:
To Reproduce
System