Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts error when using docgen #703

Closed
RodriguezTheo opened this issue Jul 12, 2024 · 3 comments
Closed

ts error when using docgen #703

RodriguezTheo opened this issue Jul 12, 2024 · 3 comments
Labels
status: help wanted Good idea, but the core developers will not work on it at the moment status: needs info/work Further information or work required (usually from the creator of the issue or PR) status: needs reproduction Needs a minimal reproduction type: bug Something isn't working

Comments

@RodriguezTheo
Copy link

RodriguezTheo commented Jul 12, 2024

Hi,

I don't understand how to use 'vue-component-meta' with @nuxtjs/storybook plugin.
I can't use typescript type props for the moment and I need to add more info in args stories...

What's is the problem ?

If i use @storybook/vue3-vite like in the doc i can't launch the project. I have errors.

image

// main.ts
import type { StorybookConfig } from "@storybook-vue/nuxt";

const config: StorybookConfig = {
  stories: [
    "../components/**/*.stories.@(js|jsx|mjs|ts|tsx)",
  ],
  addons: [
    "@storybook/addon-docs",
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/addon-interactions",
    "@storybook/addon-themes",
    "@storybook/addon-a11y",
  ],
  core: {
    disableTelemetry: true,
  },
  framework: {
    name: "@storybook-vue/nuxt",
    options: {
      docgen: "vue-component-meta",
    },
  },
};
export default config;
// package.json

// ...
  "devDependencies": {
    "@nuxtjs/i18n": "^8.0.2",
    "@nuxtjs/storybook": "^8.1.5",
    "@storybook/addon-a11y": "^8.2.2",
    "@storybook/addon-docs": "^8.2.2",
    "@storybook/addon-essentials": "^8.2.2",
    "@storybook/addon-interactions": "^8.2.2",
    "@storybook/addon-links": "^8.2.2",
    "@storybook/addon-mdx-gfm": "8.2.2",
    "@storybook/addon-storysource": "^8.2.2",
    "@storybook/addon-themes": "^8.2.2",
    "@storybook/blocks": "^8.2.2",
    "@storybook/test": "^8.2.2",
    "@storybook/vue3": "^8.2.2",
    "@storybook/vue3-vite": "^8.2.2",
    "@types/node": "^20.12.7",
    "@vitejs/plugin-vue": "^5.0.4",
    "eslint": "^8.56.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-prettier": "^5.1.3",
    "eslint-plugin-storybook": "^0.8.0",
    "eslint-plugin-vue": "^9.21.1",
    "prettier": "^3.2.5",
    "storybook": "^8.2.2",
    "typescript": "^5.3.3"
  },

// ...
// nuxt.config.ts
  modules: [
    "@nuxtjs/storybook"
  ],

Thank's for help :)

@tobiasdiez
Copy link
Collaborator

Strange, this ts error should have been fixed with #649. @mehcode is it working for you now?

@tobiasdiez tobiasdiez added type: bug Something isn't working status: needs info/work Further information or work required (usually from the creator of the issue or PR) status: help wanted Good idea, but the core developers will not work on it at the moment labels Jul 13, 2024
@tobiasdiez tobiasdiez changed the title Vue-component-meta ts error when using docgen Jul 13, 2024
@RodriguezTheo
Copy link
Author

That's why I update packages but I don't understand.... :/

@mehcode
Copy link
Contributor

mehcode commented Jul 17, 2024

Yeah. This is working for me.

image

I would confirm you are using the 8.1.x release of storybook-vue/nuxt. That's been the issues for awhile as the packages weren't being updated in lockstep before. Check your lockfile.

@tobiasdiez tobiasdiez added the status: needs reproduction Needs a minimal reproduction label Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted Good idea, but the core developers will not work on it at the moment status: needs info/work Further information or work required (usually from the creator of the issue or PR) status: needs reproduction Needs a minimal reproduction type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants