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

Addon Docs @typescript-eslint definition error #9407

Closed
jcousins-ynap opened this issue Jan 13, 2020 · 3 comments
Closed

Addon Docs @typescript-eslint definition error #9407

jcousins-ynap opened this issue Jan 13, 2020 · 3 comments

Comments

@jcousins-ynap
Copy link

Describe the bug
When running storybook the following error occurs:

WARNING in ./src/stories/0-Welcome.stories.js
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

  Line 5:1:   Definition for rule '@typescript-eslint/no-unused-vars' was not found  @typescript-eslint/no-unused-vars

Although it occurs on first build, there is no issue in ignoring the error.

However, on a rebuild after saving a file the error stops storybook from rendering. This overlay is only removed when storybook is restarted.

To Reproduce
Steps to reproduce the behavior:

  1. Create a simple react-app
    npm init react-app test
  2. Add storybook
    npx -p @storybook/cli sb init
  3. Add addon-docs
    npm i -D @storybook/addon-docs
  // main.js
  module.exports = {
    stories: ['../src/**/*.stories.js'],
    addons: [
      '@storybook/preset-create-react-app',
      '@storybook/addon-actions',
-     '@storybook/addon-links'
+     '@storybook/addon-links',
+     '@storybook/addon-docs'
    ],
  };
  1. Start storybook
    npm run storybook

Expected behavior
For the error not to appear, and for storybook to consitantly render.

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

System:

Environment Info:

  System:
    OS: macOS 10.15.2
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
  Binaries:
    Node: 12.7.0 - ~/.nvm/versions/node/v12.7.0/bin/node
    Yarn: 1.21.1 - ~/.nvm/versions/node/v12.7.0/bin/yarn
    npm: 6.13.6 - ~/.nvm/versions/node/v12.7.0/bin/npm
  Browsers:
    Chrome: 79.0.3945.117
    Safari: 13.0.4
  npmPackages:
    @storybook/addon-actions: ^5.3.1 => 5.3.1
    @storybook/addon-docs: ^5.3.1 => 5.3.1
    @storybook/addon-links: ^5.3.1 => 5.3.1
    @storybook/addons: ^5.3.1 => 5.3.1
    @storybook/preset-create-react-app: ^1.5.1 => 1.5.1
    @storybook/react: ^5.3.1 => 5.3.1
  npmGlobalPackages:
    @storybook/cli: 5.3.1
@shilman
Copy link
Member

shilman commented Jan 13, 2020

Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.2 containing PR #9410 that references this issue. Upgrade today to try it out!

Closing this issue. Please re-open if you think there's still more to do.

@shilman
Copy link
Member

shilman commented Jan 14, 2020

Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.3 containing PR #9417 that references this issue. Upgrade today to try it out!

@jcousins-ynap
Copy link
Author

Thanks @shilman for the quick turn around 👍

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

No branches or pull requests

2 participants