Giter Club home page Giter Club logo

nuxt-storybook's People

Contributors

yassilah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nuxt-storybook's Issues

Invalid Storybook config preset

Hello!

Thank you for creating this, I tried to set it up but ran into an error immediately.
Storybook throws an error on startup at this line:

https://github.com/storybookjs/storybook/blob/8f7ed311683a9cabec4390dd572c2f2a253c6d48/code/lib/core-common/src/presets.ts#L24

 ERROR  [unhandledRejection] Cannot read properties of undefined (reading 'name')                                                                                          
  at node_modules/@storybook/core-common/dist/index.js:12:826
  at Array.filter (<anonymous>)
  at filterPresetsConfig (node_modules/@storybook/core-common/dist/index.js:12:757)
  at loadAllPresets (node_modules/@storybook/core-common/dist/index.js:15:1749)
  at buildDevStandalone (node_modules/@storybook/core-server/dist/index.js:33:2265)

because preset is undefined.

Storybook tries to load and filter the following presets:

Core

[                                          
  'project/node_modules/@storybook/core-server/dist/presets/common-preset.js',
  undefined,
  '@storybook/vue3-vite/preset',
  'project/node_modules/@storybook/core-server/dist/presets/babel-cache-preset.js'
]

Custom

[                                                              
  'project/.nuxt/.storybook/main.mjs'
]

Override

[] 

Steps to reproduce:

  1. npx nuxi init project
  2. cd project
  3. yarn add --dev @yassidev/nuxt-storybook
  4. added the empty storybook config entries and @yassidev/nuxt-storybook to nuxt.config.ts
  5. yarn dev -o

Using Node v16.16.0 (LTS) - Windows 11 (Ubuntu WSL)

After I modified filterPresetsConfig to skip the undefined config preset, it starts without an error, but the following message appears at the canvas:

Expected your framework's preset to export a `renderToCanvas` field.

Perhaps it needs to be upgraded for Storybook 6.4?
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field

Many thanks,
zsilbi

error Command "start-storybook" not found.

Hello,

First of all thanks for your effort

But I could not get this running in my nuxt 3 project, I followed the 2 steps on the readme but got stuck on what to do next, so I created a "storybook" script in my package.json calling "start-storybook" but this command was not found. So I installed @storybook/vue3 to solve this problem but now my issue is:

ERR! TypeError: Cannot read properties of undefined (reading 'NormalModule')
ERR!     at VueLoaderPlugin.apply (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/vue-loader/dist/pluginWebpack5.js:44:47)
ERR!     at webpack (/Users/diegomaradona/Code/draichiboard/node_modules/webpack/lib/webpack.js:51:13)
ERR!     at starterGeneratorFn (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:137:18)
ERR!     at starterGeneratorFn.next (<anonymous>)
ERR!     at Object.start (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:275:34)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/@storybook/core-server/dist/cjs/dev-server.js:203:28)
ERR!     at async buildDevStandalone (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/@storybook/core-server/dist/cjs/build-dev.js:120:31)
ERR!     at async buildDev (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/@storybook/core-server/dist/cjs/build-dev.js:174:5)
ERR!  TypeError: Cannot read properties of undefined (reading 'NormalModule')
ERR!     at VueLoaderPlugin.apply (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/vue-loader/dist/pluginWebpack5.js:44:47)
ERR!     at webpack (/Users/diegomaradona/Code/draichiboard/node_modules/webpack/lib/webpack.js:51:13)
ERR!     at starterGeneratorFn (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:137:18)
ERR!     at starterGeneratorFn.next (<anonymous>)
ERR!     at Object.start (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:275:34)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/@storybook/core-server/dist/cjs/dev-server.js:203:28)
ERR!     at async buildDevStandalone (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/@storybook/core-server/dist/cjs/build-dev.js:120:31)
ERR!     at async buildDev (/Users/diegomaradona/Code/draichiboard/node_modules/@storybook/vue3/node_modules/@storybook/core-server/dist/cjs/build-dev.js:174:5)

I'm opening this issue mainly to give you a feedback on how your module is working

thanks

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.