Describe the bug
Storybook For Vue guide: https://storybook.js.org/docs/guides/guide-vue/ describes the following one step to install storybook-vue
npx -p @storybook/cli sb init --type vue
However, it fails with following error:
╰─$ npx -p @storybook/cli sb init --type vue
npx: installed 408 in 25.041s
WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the `corejs` option.
You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:
npm install --save core-js@2 npm install --save core-js@3
yarn add core-js@2 yarn add core-js@3
[BABEL] Note: The code generator has deoptimised the styling of /Users/izl334/.npm/_npx/41992/lib/node_modules/@storybook/cli/node_modules/lodash/lodash.js as it exceeds the max of 500KB.
sb init - the simplest way to add a storybook to your project.
• Installing Storybook for user specified project type. ✓
• Adding storybook support to your "Vue" app
TypeError: Cannot create property 'dependencies' on boolean 'false'
at _callee$ (/Users/izl334/.npm/_npx/41992/lib/node_modules/@storybook/cli/generators/VUE/index.js:33:3)
at call (/Users/izl334/.npm/_npx/41992/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.tryCatch [as _invoke] (/Users/izl334/.npm/_npx/41992/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator._invoke [as next] (/Users/izl334/.npm/_npx/41992/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (/Users/izl334/.npm/_npx/41992/lib/node_modules/@storybook/cli/generators/VUE/index.js:36:103)
at _next (/Users/izl334/.npm/_npx/41992/lib/node_modules/@storybook/cli/generators/VUE/index.js:38:194)
at process._tickCallback (internal/process/next_tick.js:68:7)
To Reproduce
Steps to reproduce the behavior:
npx -p @storybook/cli sb init --type vueScreenshots

System:
Additional context
node v10.14.2
npm v6.4.1
@vikikamath Do you have a package.json in the folder you're running this in? if not, you should? storybook is meant to run in a currently existing vue project, not to create a new one from scratch.
if you are using vue-cli, i recommend installing storybook via vue-cli-plugin-storybook
Thanks guys! vue-cli-plugin-storybook worked like a charm!
Most helpful comment
if you are using vue-cli, i recommend installing storybook via vue-cli-plugin-storybook