question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

Storybook v.6.3.6 - Webpack 5 - Loading forever

See original GitHub issue

Describe the bug Storybook is loading forever.

To Reproduce Start storybook (start-storybook -p 6007 -s ./public). Wait forever.

P.D: Iโ€™ve tried reproduction but an error occurs

yarn install
An error occurred while executing: `yarn install`
Command output was:
Type Error: Cannot read property 'match' of undefined


๐Ÿšจ Dependencies installation failed
๐Ÿšจ Failed to create repro

System Mac OSX - Latest version

Additional context

.storybook/main.js

const path = require('path');
const dotenv = require('dotenv-webpack');
const CopyPlugin = require('copy-webpack-plugin');

module.exports = {
  stories: ['../src/components/**/*stories.js'],
  addons: [
    '@storybook/addon-essentials',
    '@storybook/addon-a11y'
  ],
  core: {
    builder: 'webpack5'
  },
  webpackFinal: async config => {
    config.resolve.fallback.fs = false;
    config.resolve.fallback.stream = false;
    config.plugins.push(new dotenv());
    config.plugins.push(
      new CopyPlugin({
        patterns: [
          {
            from: path.resolve(__dirname, '../public/fonts'),
            to: 'fonts/'
          }
        ]
      })
    );
    config.plugins = config.plugins.filter(p => String(p.resourceRegExp) !== '/core-js/');
    return config;
  }
};

dotenv-webpack installed as a devDependency (v.6.0.4) storybook and related libs (addons, etc) at v6.3.6. Webpack at v5.36.2

Web Output SB Fail

Terminal output

info @storybook/react v6.3.6
info 
info => Loading presets
info => Serving static files from ././public at /
info => Loading 1 config file in "/Users/username/.storybook"
info => Loading 8 other files in "/Users/username/.storybook"
info => Adding stories defined in "/Users/username/.storybook/main.js"
info => Using implicit CSS loaders
info => Using default Webpack5 setup
<i> [webpack-dev-middleware] wait until bundle finished
10% building 0/1 entries 0/0 dependencies 0/0 modules
info => Using cached manager
99% done plugins webpack-hot-middlewarewebpack built preview d1a3b3ded0a609aac380 in 12400ms
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                    โ”‚
โ”‚   Storybook 6.3.6 started                          โ”‚
โ”‚   13 s for preview                                 โ”‚
โ”‚                                                    โ”‚
โ”‚    Local:            http://localhost:6007/        โ”‚
โ”‚    On your network:  http://192.168.1.106:6007/    โ”‚
โ”‚                                                    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
<i> [webpack-dev-middleware] wait until bundle finished: /vendors-node_modules_storybook_ui_node_modules_storybook_components_dist_esm_ScrollArea_Overl-dcb01a.manager.bundle.js
<i> [webpack-dev-middleware] wait until bundle finished: /vendors-node_modules_storybook_ui_node_modules_storybook_components_dist_esm_ScrollArea_Globa-dbae17.manager.bundle.js
<i> [webpack-dev-middleware] wait until bundle finished: /vendors-node_modules_storybook_ui_node_modules_storybook_components_dist_esm_tooltip_WithTooltip_js.manager.bundle.js
<i> [webpack-dev-middleware] wait until bundle finished: /iframe.html?id=*&viewMode=story
99% done plugins webpack-hot-middlewarewebpack built preview d03d8fd9ef7412693598 in 1008ms

If I build instead of start storybook, It completes, but I have the annoying DefinePlugin message:

WARN DefinePlugin
WARN Conflicting values for 'process.env'

Thank you

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
IgnacioNMirandacommented, Sep 1, 2021

Having exactly the same error, still donโ€™t know how to fix it ):

1reaction
yoavnirancommented, Dec 11, 2021

Im having the same issue as described here and in: #14405 Both on 6.4.9 and 6.3.12. Webpack: 5.65.0

After upgrading from 6.2.2 and webpack 4.

I tried removing all addons and stories but process hangs on:

99% done plugins webpack-hot-middlewarewebpack built preview 0ca4f1dc51ae93289621 in 14279ms

on 6.3.12 I also see the warning about define plugin (Conflicting values for โ€˜process.envโ€™) and this error in the browser:


bootstrap:27 Uncaught TypeError: util.inherits is not a function
    at Object../node_modules/assert/assert.js (assert.js:164)
    at __webpack_require__ (bootstrap:24)
    at fn (hot module replacement:61)
    at utility.js:32
    at Object../node_modules/doctrine/lib/utility.js (utility.js:33)
    at __webpack_require__ (bootstrap:24)
    at fn (hot module replacement:61)
    at typed.js:27
    at Object../node_modules/doctrine/lib/typed.js (typed.js:1304)
    at __webpack_require__ (bootstrap:24)

The manager loads as I see elements on the page including my custom logo. The preview seems hanging with the spinner.

With 6.4.9 the process would eventually break on flow(bin) types in my stories. 6.3.12 simply hangs forever.

I also tried deleting node_modules for good measure but no difference.

The repo with the updated branch can be found on this react-uploady branch

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook v.6.3.6 - Webpack 5 - Loading forever #15719
Describe the bug Storybook is loading forever. To Reproduce Start storybook (start-storybook -p 6007 -s ./public). Wait forever.
Read more >
Webpack 5 and Storybook 6 integration throws an error in ...
First, you will need to install @storybook/builder-webpack5@next . Then you have to upgrade every @storybook dependency to version ^6.3.0-alpha.
Read more >
storybook/addon-docs - npm
The addon-docs preset has a few configuration options that can be used to configure its babel/webpack loading behavior. Here's an example of howย ......
Read more >
Storybook Unable to load on DSM website - InVision Support
First the template.Bind() it's not valid anymore with Storybook version 6.3.6, then I had to make a lot of changes inside story.js, preview.jsย ......
Read more >
Debian -- Source Packages in "stretch"
... automaton (1.11-8+dfsg1-1); automoc (1.0~version-0.9.88-5); automx (0.10.0-2.1) ... golang-github-hashicorp-go-version (0.0~git20150915.0.2b9865f-1)ย ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found