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

[Bug]: Storybook doesn't run on a fresh Nuxt 3 app #21815

Closed
ncphillips opened this issue Mar 29, 2023 · 5 comments
Closed

[Bug]: Storybook doesn't run on a fresh Nuxt 3 app #21815

ncphillips opened this issue Mar 29, 2023 · 5 comments

Comments

@ncphillips
Copy link

Describe the bug

I created a fresh Nuxt 3 app and tried to add storybook.

Storybook doesn't run when you try to install it on a brand new Nuxt 3 app

$ start-storybook -p 6006
info @storybook/vue3 v6.5.16
info 
✔ Port 6006 is not available. Would you like to run Storybook on port 6007 instead? … yes
info => Loading presets

info Addon-docs: using MDX1
info => Using implicit CSS loaders
info => Using default Webpack4 setup
(node:72039) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.

See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
(Use `node --trace-deprecation ...` to show where the warning was created)
0% compilingERR! TypeError: Cannot read properties of undefined (reading 'get')
ERR!     at /Users/nolan/Code/my-app/node_modules/@storybook/vue3/node_modules/webpack/lib/DefinePlugin.js:292:38
ERR!     at SyncHook.eval [as call] (eval at create (/Users/nolan/Code/my-app/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:15:1)
ERR!     at SyncHook.lazyCompileHook (/Users/nolan/Code/my-app/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at Compiler.newCompilation (/Users/nolan/Code/my-app/node_modules/webpack/lib/Compiler.js:631:26)
ERR!     at /Users/nolan/Code/my-app/node_modules/webpack/lib/Compiler.js:667:29
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/nolan/Code/my-app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/Users/nolan/Code/my-app/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at Compiler.compile (/Users/nolan/Code/my-app/node_modules/webpack/lib/Compiler.js:662:28)
ERR!     at /Users/nolan/Code/my-app/node_modules/webpack/lib/Watching.js:77:18
ERR!     at _next0 (eval at create (/Users/nolan/Code/my-app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
ERR!  TypeError: Cannot read properties of undefined (reading 'get')
ERR!     at /Users/nolan/Code/my-app/node_modules/@storybook/vue3/node_modules/webpack/lib/DefinePlugin.js:292:38
ERR!     at SyncHook.eval [as call] (eval at create (/Users/nolan/Code/my-app/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:15:1)
ERR!     at SyncHook.lazyCompileHook (/Users/nolan/Code/my-app/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at Compiler.newCompilation (/Users/nolan/Code/my-app/node_modules/webpack/lib/Compiler.js:631:26)
ERR!     at /Users/nolan/Code/my-app/node_modules/webpack/lib/Compiler.js:667:29
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/nolan/Code/my-app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/Users/nolan/Code/my-app/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at Compiler.compile (/Users/nolan/Code/my-app/node_modules/webpack/lib/Compiler.js:662:28)
ERR!     at /Users/nolan/Code/my-app/node_modules/webpack/lib/Watching.js:77:18
ERR!     at _next0 (eval at create (/Users/nolan/Code/my-app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

info => Loading presets
error Command failed with exit code 1.

To Reproduce

npx nuxi@latest init my-app

cd my-app
yarn

npx storybook init --type vue3
yarn storybook

System

No response

Additional context

No response

@scscgit
Copy link

scscgit commented May 4, 2023

Related Nuxt modules and their open issues:

Have there been any updates for the last couple of months?

@ncphillips
Copy link
Author

not sure what "updates" meants

I tried again a couple times and couldn't get it working. Haven't tried in a couple weeks though.

@scscgit
Copy link

scscgit commented May 5, 2023

Yes, I meant that this issue is being completely ignored by everyone :(

@hirotaka
Copy link

I just released an add-on to simplify Storybook setup in Nuxt3 projects.
I have completed my necessary features, but more features may be required.
I would appreciate your feedback on this 😉

https://github.com/hirotaka/storybook-addon-nuxt

@shilman
Copy link
Member

shilman commented May 18, 2023

Closing as dupe to #20312

@shilman shilman closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants