Storybook: Error in CLI with Vue support

Created on 17 Dec 2018  路  10Comments  路  Source: storybookjs/storybook

Describe the bug
A clear and concise description of what the bug is.
Quick start with Storybook with Vue supported error.

To Reproduce
Steps to reproduce the behavior:

  1. run npx -p @storybook/cli sb init
  2. Choose Vue
  3. See error
     TypeError: Cannot create property 'dependencies' on boolean 'false'
    at _callee$ (/Users/kamontat/.npm/_npx/94048/lib/node_modules/@storybook/cli/generators/VUE/index.js:33:3)
    at call (/Users/kamontat/.npm/_npx/94048/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.tryCatch [as _invoke] (/Users/kamontat/.npm/_npx/94048/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:288:22)
    at Generator._invoke [as next] (/Users/kamontat/.npm/_npx/94048/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:114:21)
    at asyncGeneratorStep (/Users/kamontat/.npm/_npx/94048/lib/node_modules/@storybook/cli/generators/VUE/index.js:34:103)
    at _next (/Users/kamontat/.npm/_npx/94048/lib/node_modules/@storybook/cli/generators/VUE/index.js:36:194)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Expected behavior
Create project

Screenshots
If applicable, add screenshots to help explain your problem.

screen shot 2018-12-17 at 15 29 33

Code snippets
If applicable, add code samples to help explain your problem.

System:

  • OS: [e.g. iOS, Windows10, MacOS] MacOS
  • Device: [e.g. iPhoneX, Macbook Pro 2018] Macbook Pro 2015
  • Browser: [e.g. chrome, safari] chrome
  • Framework: [e.g. react, vue, angular] vue
  • Addons: [if relevant]
  • Version: [e.g. 4.0.0] cli version: 6.4.1

Additional context
Add any other context about the problem here.

vue question / support

Most helpful comment

You might need to add this into documentation.

All 10 comments

you need to prepare package.json first

I see.

You might need to add this into documentation.

Can someone tell me the exact steps to setup storybooks

1 - npm init
2 - npx -p @storybook/cli sb init --type vue

cc @ndelangen for #6002

+1 just had to search to resolve this. It would be really nice if the error said, "Do you have a package.json?"

Can I delete the package.json after installing Storybook? I only made one to satisfy the install requirements, but I already have a main package.json in the parent folder, separate from the React-specific stuff.

@anevaude Can you just install it in the parent directory?

@anevaude Can you just install it in the parent directory?

@shilman - Oh yep! That's no problem at all. I just didn't know if it was "proper" to put it in the app directory itself. Some guides make it sound like that's the right way to go about things. :)

Was this page helpful?
0 / 5 - 0 ratings