storybookjs / vue-cli-plugin-storybook

Vue CLI plugin for Storybook
MIT License
279 stars 44 forks source link

Error from vue add storybook #95

Closed findingorder closed 4 years ago

findingorder commented 4 years ago

Hello, I ran "vue add storybook" from the directory in which my vue-cli project is located. It installed a lot of stuff, but ended with the error message:

added 612 packages from 738 contributors in 61.599s
⠋  Running completion hooks...error: Definition for rule 'import/no-extraneous-dependencies' was not found (import/no-extraneous-dependencies) at src/stories/index.stories.js:1:1:
> 1 | /* eslint-disable import/no-extraneous-dependencies */
    | ^
  2 | import { action } from '@storybook/addon-actions'
  3 | import { linkTo } from '@storybook/addon-links'
  4 | 

Could you please help me resolve this?

pksunkara commented 4 years ago

It should be installed correctly. This is just your linter complaining. Don't you have eslint installed?

LeBenLeBen commented 4 years ago

@pksunkara I also encountered this issue once, removed the line and it worked. But I'm wondering why you need this? It's a rule from eslint-plugin-import and not everybody have it installed. My guess is that this error would happen to a lot of users.

pksunkara commented 4 years ago

So, the fix for this is that eslint feature needs to be checked before generating.