question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sb + vite + vue: No docs.container on docs tab on clean setup

See original GitHub issue

Describe the bug Docs Page doesnt work >6.5.0-alpha.47 with vite setup.

To Reproduce Via Repo: https://github.com/webdesignberlin/sb-builder-vite-no-container Or via Steps:

Node 16 npm init vue@latest

✔ Project name: … latest-test
✔ Add TypeScript? … Yes
✔ Add JSX Support? … No
✔ Add Vue Router for Single Page Application development? … No
✔ Add Pinia for state management? … No
✔ Add Vitest for Unit Testing? … Yes
✔ Add Cypress for End-to-End testing? … Yes
✔ Add ESLint for code quality? … Yes
✔ Add Prettier for code formatting? … No

npm install Run SB init: npx sb@next init --builder storybook-builder-vite Run Storybook: npm run storybook go to some docs page get following Error: Uncaught (in promise) Error: Nodocs.containerset, did you runaddon-docs/preset? at _callee$ (renderDocs-LVJGRNMN.js:110:19) at tryCatch (:6007/node_modules/.vite-storybook/chunk-2ZKQNBD4.js?v=506d2ae8:45:44) at Generator.invoke [as _invoke] (:6007/node_modules/.vite-storybook/chunk-2ZKQNBD4.js?v=506d2ae8:182:26) at Generator.next (:6007/node_modules/.vite-storybook/chunk-2ZKQNBD4.js?v=506d2ae8:78:25) at asyncGeneratorStep (renderDocs-LVJGRNMN.js:64:24) at _next (renderDocs-LVJGRNMN.js:82:9) at renderDocs-LVJGRNMN.js:87:7 at new Promise (<anonymous>) at renderDocs-LVJGRNMN.js:79:12 at _renderDocsAsync (renderDocs-LVJGRNMN.js:166:27) renderDocs.js:39 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'container') at _callee$ (renderDocs.js:39:32) at tryCatch (runtime.js:63:40) at Generator.invoke [as _invoke] (runtime.js:294:22) at Generator.next (runtime.js:119:21) at asyncGeneratorStep (renderDocs.js:5:99) at _next (renderDocs.js:7:194) at renderDocs.js:7:364 at new Promise (<anonymous>) at renderDocs.js:7:97 at renderDocsAsync (renderDocs.js:17:27) _callee$ @ renderDocs.js:39 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonym) @ runtime.js:119 asyncGeneratorStep @ renderDocs.js:5 _next @ renderDocs.js:7 (anonym) @ renderDocs.js:7 (anonym) @ renderDocs.js:7 renderDocsAsync @ renderDocs.js:17 renderDocs @ renderDocs.js:13 _callee2$ @ DocsRender.js:127 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonym) @ runtime.js:119 asyncGeneratorStep @ DocsRender.js:7 _next @ DocsRender.js:9 Promise.then (async) renderDocs @ renderDocs.js:13 _callee2$ @ DocsRender.js:127 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonym) @ runtime.js:119 asyncGeneratorStep @ DocsRender.js:7 _next @ DocsRender.js:9 Promise.then (async) asyncGeneratorStep @ DocsRender.js:7 _next @ DocsRender.js:9 (anonym) @ DocsRender.js:9 (anonym) @ DocsRender.js:9 render @ DocsRender.js:140 _callee$ @ DocsRender.js:87 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonym) @ runtime.js:119 asyncGeneratorStep @ DocsRender.js:7 _next @ DocsRender.js:9 Promise.then (async) asyncGeneratorStep @ DocsRender.js:7 _next @ DocsRender.js:9 (anonym) @ DocsRender.js:9 (anonym) @ DocsRender.js:9 renderToElement @ DocsRender.js:98 _callee12$ @ PreviewWeb.js:934 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonym) @ runtime.js:119 asyncGeneratorStep3 @ PreviewWeb.js:8 _next @ PreviewWeb.js:10 Promise.then (async) asyncGeneratorStep3 @ PreviewWeb.js:8 _next @ PreviewWeb.js:10 Promise.then (async) asyncGeneratorStep3 @ PreviewWeb.js:8 _next @ PreviewWeb.js:10 (anonym) @ PreviewWeb.js:10 (anonym) @ PreviewWeb.js:10 renderSelection @ PreviewWeb.js:949 onSetCurrentStory @ PreviewWeb.js:560 (anonym) @ index.js:168 handleEvent @ index.js:167 (anonym) @ index.js:52 handler @ index.js:101 handleEvent @ index.js:286 postMessage (async) (anonym) @ main.f1159ece7311d200d210.manager.bundle.js:2 send @ main.f1159ece7311d200d210.manager.bundle.js:2 handler @ main.f1159ece7311d200d210.manager.bundle.js:2 emit @ main.f1159ece7311d200d210.manager.bundle.js:2 emit @ main.f1159ece7311d200d210.manager.bundle.js:2 (anonym) @ main.f1159ece7311d200d210.manager.bundle.js:2 Ii @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 Vj @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 exports.unstable_runWithPriority @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 cg @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 Dj @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 yj @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 (anonym) @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 exports.unstable_runWithPriority @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 cg @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 fg @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 gg @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 Ga @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2 gd @ vendors~main.d735861ee42d9ccf0ed5.manager.bundle.js:2

System

Note: current replaced with 6.5.0-alpha.47 cause this version works. 6.5.0-alpha.49 dont.
Environment Info:

  System:
    OS: macOS 12.2.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 99.0.4844.74
    Safari: 15.3
  npmPackages:
    @storybook/addon-actions: 6.5.0-alpha.47 => 6.5.0-alpha.47 
    @storybook/addon-essentials: 6.5.0-alpha.47 => 6.5.0-alpha.47 
    @storybook/addon-links: 6.5.0-alpha.47 => 6.5.0-alpha.47 
    @storybook/vue3: 6.5.0-alpha.47 => 6.5.0-alpha.47 

Additional context This seems to be an issue in the latest alpha versions. Using 6.5.0-alpha.47 avoids the problem. https://github.com/eirslett/storybook-builder-vite/issues/285#issuecomment-1073987187

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
IanVScommented, Mar 28, 2022

@webdesignberlin would you mind trying out storybook-builder-vite 0.1.22?

1reaction
shilmancommented, Mar 23, 2022

@IanVS so I took a look at this one and it’s pretty weird. Findings so far:

  • The example works if you unset the builder (i.e. use webpack4 builder)
  • When I console.log in the vite-builder node_modules, i can see that addDecorator is apparently being called correctly with docs: { ... }, even on the most recent alphas

Can we pair for a few mins and see if we can get to the bottom of it together?

Read more comments on GitHub >

github_iconTop Results From Across the Web

@storybook/addon-docs | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Vite - GUN — the database for freedom fighters - Docs v2.0
@gun-vue – is where the peer-to-peer database of Gun meets the reactivity system of Vue 3. Easy to import composables for devs. Pluggable...
Read more >
storybook/addon-docs - npm
DocsPage is a zero-config aggregation of your component stories, text descriptions, docgen comments, props tables, and code examples into clean, ...
Read more >
@storybook/addon-docs: Versions | Openbase
Full version history for @storybook/addon-docs including change logs. ... Angular: Disable ngcc when not needed #19307; Vite: Add vue-vite framework for ...
Read more >
Storybook (with Vite / Typescript / MDX) doesn't show ArgsTable
New versions of the vite builder should handle this correctly now. Try upgrading with npx sb@next automigrate . If you're using typescript, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found