Closed rowphant closed 1 month ago
Disclaimer This information might be inaccurate, due to it being generated automatically To set up Storybook with Vite, Vue, Nuxt, and TailwindCSS, follow these steps:
Install Storybook:
npx storybook@latest init
Install Vite Builder:
npm install @storybook/builder-vite --save-dev
Update .storybook/main.js
:
module.exports = {
framework: '@storybook/vue3-vite',
core: {
builder: 'vite',
},
};
Configure TailwindCSS: Follow the TailwindCSS setup guide.
Refer to the Vue & Vite documentation for more details.
/docs/get-started/install.mdx /docs/get-started/frameworks/react-vite.mdx /docs/builders/vite.mdx /docs/get-started/frameworks/vue3-webpack5.mdx /docs/get-started/frameworks/vue3-vite.mdx /code/frameworks/svelte-vite/README.md /code/builders/builder-vite/README.md /docs/_snippets/web-components-vite-install.md /code/frameworks/vue3-webpack5 /code/frameworks/web-components-vite /code/core/src/server-errors.ts /docs/contribute/how-to-reproduce.mdx /docs/get-started/frameworks/svelte-vite.mdx /test-storybooks/portable-stories-kitchen-sink/vue3 /docs/_snippets/svelte-webpack5-install.md /docs/_snippets/vue3-webpack5-install.md /code/frameworks/web-components-vite/README.md /docs/_snippets/svelte-vite-install.md /code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.ts /code/frameworks/vue3-vite /code/frameworks/sveltekit/README.md /code/frameworks/vue3-vite/README.md /docs/get-started/setup.mdx /code/lib/cli-storybook /code/lib/cli/src/automigrate/fixes/vue3.ts
Well thanks to the bot. But thats exactly what i described before. It is not working.
`% npm run storybook
app@0.0.0 storybook storybook dev -p 6006
storybook v8.2.7
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. info => Starting manager.. โ [ERROR] Could not resolve "@storybook/addon-viewport/manager"
node_modules/@storybook/addon-essentials/dist/viewport/manager.js:1:14:
1 โ export * from '@storybook/addon-viewport/manager';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-viewport" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/addon-viewport/manager" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/addon-backgrounds/manager"
node_modules/@storybook/addon-essentials/dist/backgrounds/manager.js:1:14:
1 โ export * from '@storybook/addon-backgrounds/manager';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-backgrounds" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/addon-backgrounds/manager" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/addon-controls/manager"
node_modules/@storybook/addon-essentials/dist/controls/manager.js:1:14:
1 โ export * from '@storybook/addon-controls/manager';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-controls" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/addon-controls/manager" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/addon-actions/manager"
node_modules/@storybook/addon-essentials/dist/actions/manager.js:1:14:
1 โ export * from '@storybook/addon-actions/manager';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-actions" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/addon-actions/manager" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/addon-measure/manager"
node_modules/@storybook/addon-essentials/dist/measure/manager.js:1:14:
1 โ export * from '@storybook/addon-measure/manager';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-measure" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/addon-measure/manager" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/addon-outline/manager"
node_modules/@storybook/addon-essentials/dist/outline/manager.js:1:14:
1 โ export * from '@storybook/addon-outline/manager';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-outline" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/addon-outline/manager" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/addon-toolbars/manager"
node_modules/@storybook/addon-essentials/dist/toolbars/manager.js:1:14:
1 โ export * from '@storybook/addon-toolbars/manager';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-toolbars" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/addon-toolbars/manager" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "storybook/internal/core-events"
node_modules/@storybook/addon-onboarding/dist/manager.js:4:32:
4 โ import { STORY_SPECIFIED } from 'storybook/internal/core-events';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "storybook" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "storybook/internal/core-events" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "storybook/internal/core-events"
node_modules/@storybook/addon-onboarding/dist/Onboarding-HXJGOQAD.js:2:36:
2 โ import { SAVE_STORY_RESPONSE } from 'storybook/internal/core-events';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "storybook" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "storybook/internal/core-events" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/instrumenter"
node_modules/@storybook/addon-interactions/dist/manager.js:5:35:
5 โ import { CallStates, EVENTS } from '@storybook/instrumenter';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/instrumenter" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/instrumenter" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "@storybook/global"
node_modules/@storybook/addon-interactions/dist/manager.js:6:23:
6 โ import { global } from '@storybook/global';
โต ~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@storybook/global" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "@storybook/global" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "storybook/internal/core-events"
node_modules/@storybook/addon-interactions/dist/manager.js:7:144:
7 โ ...NCTION_THREW_EXCEPTION, UNHANDLED_ERRORS_WHILE_PLAYING, FORCE_REMOUNT } from 'storybook/internal/core-events';
โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "storybook" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "storybook/internal/core-events" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "filesize"
node_modules/@chromatic-com/storybook/dist/manager.mjs:7:25:
7 โ import { filesize } from 'filesize';
โต ~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "filesize" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "filesize" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "polished"
node_modules/@storybook/addon-interactions/dist/manager.js:9:31:
9 โ import { transparentize } from 'polished';
โต ~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "polished" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "polished" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "react-confetti"
node_modules/@storybook/addon-onboarding/dist/Onboarding-HXJGOQAD.js:9:26:
9 โ import ReactConfetti from 'react-confetti';
โต ~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "react-confetti" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "react-confetti" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "react-confetti"
node_modules/@chromatic-com/storybook/dist/manager.mjs:10:15:
10 โ import s8 from 'react-confetti';
โต ~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "react-confetti" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "react-confetti" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
โ [ERROR] Could not resolve "strip-ansi"
node_modules/@chromatic-com/storybook/dist/manager.mjs:11:15:
11 โ import b8 from 'strip-ansi';
โต ~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "strip-ansi" here because it's not listed as a dependency of this package:
../../.pnp.cjs:37:31:
37 โ "packageDependencies": [\
โต ~~
You can mark the path "strip-ansi" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
Error: Build failed with 17 errors:
node_modules/@chromatic-com/storybook/dist/manager.mjs:7:25: ERROR: Could not resolve "filesize"
node_modules/@chromatic-com/storybook/dist/manager.mjs:10:15: ERROR: Could not resolve "react-confetti"
node_modules/@chromatic-com/storybook/dist/manager.mjs:11:15: ERROR: Could not resolve "strip-ansi"
node_modules/@storybook/addon-essentials/dist/actions/manager.js:1:14: ERROR: Could not resolve "@storybook/addon-actions/manager"
node_modules/@storybook/addon-essentials/dist/backgrounds/manager.js:1:14: ERROR: Could not resolve "@storybook/addon-backgrounds/manager"
...
at failureErrorWithLog (./node_modules/esbuild/lib/main.js:1472:15)
at ./node_modules/esbuild/lib/main.js:945:25
at runOnEndCallbacks (./node_modules/esbuild/lib/main.js:1315:45)
at buildResponseToResult (./node_modules/esbuild/lib/main.js:943:7)
at ./node_modules/esbuild/lib/main.js:970:16
at responseCallbacks.
WARN Broken build, fix the error above. WARN You may need to refresh the browser.`
I dont get what's wrong with storybook development. I mean not even the basic installation routine is working anymore. So for now storybook is just useless :/
Describe the bug
Long story short:
I am thrilled for the concept of storybook for years and use it in many projects. Now I am about to set up a new JAM-Stack but I'm perishing because for unknown reasons, not a single of your "How-to" Tutorials and Examples is working.
My Setup is the following: Vite, Vue, Nuxt, TailwindCSS
When I try
npx storybook@latest init
it says storybook would be installed, but there a neither any new dependencies nor are there new files or scripts in package.json. Before posting any long excerpts or outputs of the CLI I want to ask you what you reccommend to set up a stack with the the packages Vite, Vue, Nuxt, TailwindCSS.Reproduction link
https://google.com
Reproduction steps
No response
System
Additional context
No response