Code Monkey home page Code Monkey logo

Comments (6)

jon9090 avatar jon9090 commented on June 4, 2024 1

@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)

from storybook.

kangaroo19 avatar kangaroo19 commented on June 4, 2024
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

from storybook.

kangaroo19 avatar kangaroo19 commented on June 4, 2024

could you show me your any stories.ts code?

from storybook.

wangmeijian avatar wangmeijian commented on June 4, 2024

@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

from storybook.

valentinpalkovic avatar valentinpalkovic commented on June 4, 2024

You have a mix of Storybook 8 and 7 dependencies. Please make sure that all Storybook dependencies are using the same version.

from storybook.

wangmeijian avatar wangmeijian commented on June 4, 2024

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",

from storybook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.