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

No docs.container on docs tab on clean setup #285

Closed
webdesignberlin opened this issue Mar 21, 2022 · 7 comments
Closed

No docs.container on docs tab on clean setup #285

webdesignberlin opened this issue Mar 21, 2022 · 7 comments

Comments

@webdesignberlin
Copy link

webdesignberlin commented Mar 21, 2022

clean setup ends in error calling docs.

Steps to reproduce:
get https://github.com/webdesignberlin/sb-builder-vite-no-container or:

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

@IanVS
Copy link
Member

IanVS commented Mar 21, 2022

It looks like you are missing @storybook/addon-docs in your list of addons: https://github.com/webdesignberlin/sb-builder-vite-no-container/blob/341e085d9ad2bc644a68e3769311c9c8310bedd2/.storybook/main.js#L6. I'll look into why this wasn't added when you initialized storybook.

@webdesignberlin
Copy link
Author

If i add @storybook/addon-docs in main.js, i get the hint that will be skipped.
both, without manually adding to the package.json, as well as with manual adding to package.json

info => Loading presets info Found existing addon "@storybook/addon-docs", skipping.

@IanVS
Copy link
Member

IanVS commented Mar 21, 2022

Oh, it's probably included in @storybook/addon-essentials, I forgot that. I wonder why you're getting that error, then...

@IanVS
Copy link
Member

IanVS commented Mar 21, 2022

This seems to be an issue in the latest alpha versions. Using 6.5.0-alpha.47 avoids the problem. Would you mind checking for an existing issue in the main storybook repo, and opening one if one doesn't exist?

@webdesignberlin
Copy link
Author

webdesignberlin commented Mar 21, 2022

thx for help. hmmm, i have no success with 6.5.0-alpha.47. steps to reproduce:

node 16.13.0
npm init vue@latest

✔ Project name: … alpha47
✔ 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

npx sb@6.5.0-alpha.47 init --builder storybook-builder-vite
npm run storybook

@IanVS
Copy link
Member

IanVS commented Mar 21, 2022

npx sb@6.5.0-alpha.47 init will still install the latest versions. Instead, you'll need to change your package.json manually, locking the versions to 6.5.0-alpha.47 (without the caret ^), and running npm install --legacy-peer-deps

@webdesignberlin
Copy link
Author

okay. i can confirm that it works with version 6.5.0-alpha.47. I create an issue in the storybook repo. many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants