Storybook: Addon Docs @typescript-eslint definition error

Created on 13 Jan 2020  路  3Comments  路  Source: storybookjs/storybook

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
bug source-loader

All 3 comments

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.

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!

Thanks @shilman for the quick turn around 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hckhanh picture hckhanh  路  69Comments

ilyaulyanov picture ilyaulyanov  路  100Comments

enagy27 picture enagy27  路  69Comments

dependencies[bot] picture dependencies[bot]  路  142Comments

p3k picture p3k  路  61Comments