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

wait until bundle finished, stopped at 99% [webpack 5] #14405

Closed
leslie555 opened this issue Mar 31, 2021 · 97 comments
Closed

wait until bundle finished, stopped at 99% [webpack 5] #14405

leslie555 opened this issue Mar 31, 2021 · 97 comments

Comments

@leslie555
Copy link

leslie555 commented Mar 31, 2021

when I run start, the progress bar is stuck at 99%. and then my local web page opened but just keep loading.
I use npm to install packages.

OS: window 10
node: V10.22.0
npm : V6.14.6

storybook config:

const custom = require('../../webpack.config.js');

module.exports = {
  stories: [
    '../../src/components/V2/**/*.stories.js',
    '../../src/services/Templates/**/*.stories.js',
  ],
  addons: [
    '@storybook/addon-actions',
    '@storybook/addon-links',
    '@storybook/addon-notes',
    '@storybook/addon-knobs',
  ],
  core: {
    builder: "webpack5",
  },
  webpackFinal: async (config) => {
    config.plugins.push(new MiniCssExtractPlugin());
    
    return {
      ...config,
      module: {
        ...config.module,
        rules: [
          ...custom.module.rules,
          ...config.module.rules.filter((rule) => rule.test.toString() !== '/\\.css$/'),
        ]
      },
      resolve: {
        ...config.resolve,
        fallback: {
          ...config.resolve.fallback,
          ...custom.resolve.fallback,
        },
        alias: {
          ...config.resolve.alias,
          ...custom.resolve.alias,
        }
      }
    };
  }
}

devDependencies

"devDependencies": {
    "@babel/core": "^7.13.8",
    "@babel/plugin-proposal-class-properties": "^7.13.0",
    "@babel/plugin-transform-runtime": "^7.10.5",
    "@babel/preset-env": "^7.13.8",
    "@babel/preset-react": "^7.12.13",
    "@kooneko/livereload-webpack-plugin": "^1.2.1",
    "@storybook/addon-actions": "^6.2.0-rc.4",
    "@storybook/addon-info": "^5.3.21",
    "@storybook/addon-knobs": "^6.2.0-rc.4",
    "@storybook/addon-links": "^6.2.0-rc.4",
    "@storybook/addon-notes": "^5.3.21",
    "@storybook/addons": "^6.2.0-rc.4",
    "@storybook/builder-webpack5": "^6.2.0-rc.4",
    "@storybook/channels": "^6.2.0-rc.4",
    "@storybook/react": "^6.2.0-rc.4",
    "@testing-library/dom": "^7.21.7",
    "@testing-library/jest-dom": "^5.11.2",
    "@testing-library/react": "^10.4.7",
    "@testing-library/user-event": "^12.1.0",
    "@types/sortablejs": "^1.10.6",
    "@webpack-cli/serve": "^1.3.0",
    "autoprefixer": "^9.8.6",
    "babel-eslint": "^10.1.0",
    "babel-loader": "^8.2.2",
    "css-loader": "^5.0.2",
    "enzyme": "3.11.0",
    "enzyme-adapter-react-16": "1.15.2",
    "eslint": "^7.3.1",
    "eslint-config-airbnb": "^18.2.0",
    "eslint-import-resolver-alias": "^1.1.2",
    "eslint-plugin-babel": "^5.3.1",
    "eslint-plugin-import": "^2.22.0",
    "eslint-plugin-jsx-a11y": "^6.3.1",
    "eslint-plugin-prefer-object-spread": "^1.2.1",
    "eslint-plugin-react": "^7.20.3",
    "extract-text-webpack-plugin": "^3.0.2",
    "file-loader": "^6.2.0",
    "html-loader": "^2.0.0",
    "html-webpack-plugin": "^5.3.1",
    "husky": "^4.2.5",
    "jest": "^25.5.4",
    "jest-canvas-mock": "^2.2.0",
    "jest-cli": "^25.5.4",
    "lint-staged": "^10.2.11",
    "node-sass": "^4.14.1",
    "postcss-loader": "^5.0.0",
    "react-markdown": "^4.3.1",
    "resolve-url-loader": "^3.1.2",
    "sass-loader": "^11.0.1",
    "sass-resources-loader": "^2.1.1",
    "sortablejs": "^1.13.0",
    "style-loader": "^1.3.0",
    "url-loader": "^3.0.0",
    "webpack": "^5.22.0",
    "webpack-cli": "^4.5.0",
    "webpack-dev-middleware": "^4.1.0",
    "webpack-dev-server": "^3.11.2",
    "webpack-virtual-modules": "^0.4.2"
  }

Screenshots
image
image

┆Issue is synchronized with this Asana task by Unito

@shilman
Copy link
Member

shilman commented Mar 31, 2021

Do you have a repro repo you can share?

@shilman shilman added this to the 6.2 stabilization milestone Mar 31, 2021
@leslie555
Copy link
Author

sorry it's private and I'm not admin

@daviddelusenet
Copy link

daviddelusenet commented Mar 31, 2021

I think I'm experiencing a similar issue:

info @storybook/react v6.2.1
info
info => Loading presets
info => Loading 1 config file in "/Users/daviddelusenet/Development/react-components/storybook"
info => Loading 8 other files in "/Users/daviddelusenet/Development/react-components/storybook"
info => Adding stories defined in "/Users/daviddelusenet/Development/react-components/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 modulesinfo => Using cached manager
99% done plugins webpack-hot-middlewarewebpack built preview a16e82c975a3573b1c34 in 9471ms
╭──────────────────────────────────────────────────────╮
│                                                      │
│   Storybook 6.2.1 started                            │
│   10 s for preview                                   │
│                                                      │
│    Local:            http://localhost:9001/          │
│    On your network:  http://192.168.178.143:9001/    │
│                                                      │
╰──────────────────────────────────────────────────────╯
99% done plugins webpack-hot-middlewarewebpack built preview 4ded963b174d5c7e2f53 in 967ms

When I go to http://localhost:9001/ I just get Cannot GET /.

Contents of main.js:

module.exports = {
  stories: ['../src/**/*.stories.@(jsx|tsx|mdx)'],
  core: {
    builder: 'webpack5',
  },
  addons: [
    '@storybook/addon-knobs',
    '@storybook/addon-actions',
    '@storybook/addon-docs',
    '@storybook/addon-viewport',
    '@storybook/addon-a11y',
    '@storybook/addon-links',
    '@storybook/addon-storysource',
  ],
}

Output of npx sb@next info:

  System:
    OS: macOS 11.2.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.9 - ~/Development/react-components/node_modules/.bin/npm
  Browsers:
    Chrome: 89.0.4389.90
    Firefox: 85.0.2
    Safari: 14.0.3
  npmPackages:
    @storybook/addon-a11y: ^6.2.1 => 6.2.1
    @storybook/addon-actions: ^6.2.1 => 6.2.1
    @storybook/addon-docs: ^6.2.1 => 6.2.1
    @storybook/addon-knobs: ^6.2.1 => 6.2.1
    @storybook/addon-links: ^6.2.1 => 6.2.1
    @storybook/addon-storyshots: ^6.2.1 => 6.2.1
    @storybook/addon-storysource: ^6.2.1 => 6.2.1
    @storybook/addon-viewport: ^6.2.1 => 6.2.1
    @storybook/builder-webpack5: ^6.2.1 => 6.2.1
    @storybook/core: ^6.2.1 => 6.2.1
    @storybook/react: ^6.2.1 => 6.2.1
    @storybook/source-loader: ^6.2.1 => 6.2.1

Please let me know if you need any more information.

@abhijit945
Copy link

Facing the above issue as well. Cannot GET /

@andy-57blocks
Copy link

I am also facing the above issue as well, no error information, I get this warning in the console:
image

 vendors~main.manager.bundle.js:120986 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.
(anonymous) @ vendors~main.manager.bundle.js:120986
./node_modules/react-dom/node_modules/scheduler/cjs/scheduler.development.js @ vendors~main.manager.bundle.js:121541
__webpack_require__ @ runtime~main.manager.bundle.js:85
./node_modules/react-dom/node_modules/scheduler/index.js @ vendors~main.manager.bundle.js:121560
__webpack_require__ @ runtime~main.manager.bundle.js:85
(anonymous) @ vendors~main.manager.bundle.js:92365
./node_modules/react-dom/cjs/react-dom.development.js @ vendors~main.manager.bundle.js:120139
__webpack_require__ @ runtime~main.manager.bundle.js:85
./node_modules/react-dom/index.js @ vendors~main.manager.bundle.js:120186
__webpack_require__ @ runtime~main.manager.bundle.js:85
./node_modules/@storybook/core-client/dist/esm/manager/index.js @ vendors~main.manager.bundle.js:32086
__webpack_require__ @ runtime~main.manager.bundle.js:85
0 @ main.manager.bundle.js:33
__webpack_require__ @ runtime~main.manager.bundle.js:85
checkDeferredModules @ runtime~main.manager.bundle.js:46
webpackJsonpCallback @ runtime~main.manager.bundle.js:33
(anonymous) @ main.manager.bundle.js:1

Here is the final webpack configurations:

Preview webpack config
{
  name: 'preview',
  mode: 'development',
  bail: false,
  devtool: 'cheap-module-source-map',
  entry: [
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-server/dist/cjs/globals/polyfills.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-server/dist/cjs/globals/globals.js',
    '/Users/57block/Downloads/work/milton/stories/config/storybook-init-framework-entry.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-actions/dist/esm/preset/addDecorator.js-generated-other-entry.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-actions/dist/esm/preset/addArgs.js-generated-other-entry.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-links/dist/esm/preset/addDecorator.js-generated-other-entry.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-knobs/dist/esm/preset/addDecorator.js-generated-other-entry.js',
    '/Users/57block/Downloads/work/milton/stories/config/preview.js-generated-config-entry.js',
    '/Users/57block/Downloads/work/milton/stories/config/generated-stories-entry.js',
    '/Users/57block/Downloads/work/milton/node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined'
  ],
  output: {
    path: '/Users/57block/Downloads/work/milton/node_modules/.cache/storybook/public',
    filename: '[name].iframe.bundle.js',
    publicPath: ''
  },
  stats: { preset: 'none', logging: 'error' },
  watchOptions: { aggregateTimeout: 10, ignored: /node_modules/ },
  ignoreWarnings: [ { message: /export '\S+' was not found in 'global'/ } ],
  plugins: [
    VirtualModulesPlugin {
      _compiler: null,
      _watcher: null,
      _staticModules: {
        '/Users/57block/Downloads/work/milton/stories/config/storybook-init-framework-entry.js': "import '@storybook/react';",
        '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-actions/dist/esm/preset/addDecorator.js-generated-other-entry.js': 'function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n' +
          '\n' +
          'function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n' +
          '\n' +
          'function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n' +
          '\n' +
          '/* eslint-disable import/no-unresolved */\n' +
          "import { addDecorator, addParameters, addLoader, addArgTypesEnhancer } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-api';\n" +
          "import { logger } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-logger';\n" +
          "import * as config from '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-actions/dist/esm/preset/addDecorator.js';\n" +
          'Object.keys(config).forEach(function (key) {\n' +
          '  var value = config[key];\n' +
          '\n' +
          '  switch (key) {\n' +
          "    case 'args':\n" +
          "    case 'argTypes':\n" +
          '      {\n' +
          "        return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));\n" +
          '      }\n' +
          '\n' +
          "    case 'decorators':\n" +
          '      {\n' +
          '        return value.forEach(function (decorator) {\n' +
          '          return addDecorator(decorator, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'loaders':\n" +
          '      {\n' +
          '        return value.forEach(function (loader) {\n' +
          '          return addLoader(loader, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'parameters':\n" +
          '      {\n' +
          '        return addParameters(_objectSpread({}, value), false);\n' +
          '      }\n' +
          '\n' +
          "    case 'argTypesEnhancers':\n" +
          '      {\n' +
          '        return value.forEach(function (enhancer) {\n' +
          '          return addArgTypesEnhancer(enhancer);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'globals':\n" +
          "    case 'globalTypes':\n" +
          '      {\n' +
          '        var v = {};\n' +
          '        v[key] = value;\n' +
          '        return addParameters(v, false);\n' +
          '      }\n' +
          '\n' +
          '    default:\n' +
          '      {\n' +
          '        // eslint-disable-next-line prefer-template\n' +
          "        return console.log(key + ' was not supported :( !');\n" +
          '      }\n' +
          '  }\n' +
          '});',
        '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-actions/dist/esm/preset/addArgs.js-generated-other-entry.js': 'function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n' +
          '\n' +
          'function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n' +
          '\n' +
          'function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n' +
          '\n' +
          '/* eslint-disable import/no-unresolved */\n' +
          "import { addDecorator, addParameters, addLoader, addArgTypesEnhancer } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-api';\n" +
          "import { logger } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-logger';\n" +
          "import * as config from '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-actions/dist/esm/preset/addArgs.js';\n" +
          'Object.keys(config).forEach(function (key) {\n' +
          '  var value = config[key];\n' +
          '\n' +
          '  switch (key) {\n' +
          "    case 'args':\n" +
          "    case 'argTypes':\n" +
          '      {\n' +
          "        return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));\n" +
          '      }\n' +
          '\n' +
          "    case 'decorators':\n" +
          '      {\n' +
          '        return value.forEach(function (decorator) {\n' +
          '          return addDecorator(decorator, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'loaders':\n" +
          '      {\n' +
          '        return value.forEach(function (loader) {\n' +
          '          return addLoader(loader, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'parameters':\n" +
          '      {\n' +
          '        return addParameters(_objectSpread({}, value), false);\n' +
          '      }\n' +
          '\n' +
          "    case 'argTypesEnhancers':\n" +
          '      {\n' +
          '        return value.forEach(function (enhancer) {\n' +
          '          return addArgTypesEnhancer(enhancer);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'globals':\n" +
          "    case 'globalTypes':\n" +
          '      {\n' +
          '        var v = {};\n' +
          '        v[key] = value;\n' +
          '        return addParameters(v, false);\n' +
          '      }\n' +
          '\n' +
          '    default:\n' +
          '      {\n' +
          '        // eslint-disable-next-line prefer-template\n' +
          "        return console.log(key + ' was not supported :( !');\n" +
          '      }\n' +
          '  }\n' +
          '});',
        '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-links/dist/esm/preset/addDecorator.js-generated-other-entry.js': 'function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n' +
          '\n' +
          'function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n' +
          '\n' +
          'function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n' +
          '\n' +
          '/* eslint-disable import/no-unresolved */\n' +
          "import { addDecorator, addParameters, addLoader, addArgTypesEnhancer } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-api';\n" +
          "import { logger } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-logger';\n" +
          "import * as config from '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-links/dist/esm/preset/addDecorator.js';\n" +
          'Object.keys(config).forEach(function (key) {\n' +
          '  var value = config[key];\n' +
          '\n' +
          '  switch (key) {\n' +
          "    case 'args':\n" +
          "    case 'argTypes':\n" +
          '      {\n' +
          "        return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));\n" +
          '      }\n' +
          '\n' +
          "    case 'decorators':\n" +
          '      {\n' +
          '        return value.forEach(function (decorator) {\n' +
          '          return addDecorator(decorator, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'loaders':\n" +
          '      {\n' +
          '        return value.forEach(function (loader) {\n' +
          '          return addLoader(loader, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'parameters':\n" +
          '      {\n' +
          '        return addParameters(_objectSpread({}, value), false);\n' +
          '      }\n' +
          '\n' +
          "    case 'argTypesEnhancers':\n" +
          '      {\n' +
          '        return value.forEach(function (enhancer) {\n' +
          '          return addArgTypesEnhancer(enhancer);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'globals':\n" +
          "    case 'globalTypes':\n" +
          '      {\n' +
          '        var v = {};\n' +
          '        v[key] = value;\n' +
          '        return addParameters(v, false);\n' +
          '      }\n' +
          '\n' +
          '    default:\n' +
          '      {\n' +
          '        // eslint-disable-next-line prefer-template\n' +
          "        return console.log(key + ' was not supported :( !');\n" +
          '      }\n' +
          '  }\n' +
          '});',
        '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-knobs/dist/esm/preset/addDecorator.js-generated-other-entry.js': 'function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n' +
          '\n' +
          'function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n' +
          '\n' +
          'function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n' +
          '\n' +
          '/* eslint-disable import/no-unresolved */\n' +
          "import { addDecorator, addParameters, addLoader, addArgTypesEnhancer } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-api';\n" +
          "import { logger } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-logger';\n" +
          "import * as config from '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-knobs/dist/esm/preset/addDecorator.js';\n" +
          'Object.keys(config).forEach(function (key) {\n' +
          '  var value = config[key];\n' +
          '\n' +
          '  switch (key) {\n' +
          "    case 'args':\n" +
          "    case 'argTypes':\n" +
          '      {\n' +
          "        return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));\n" +
          '      }\n' +
          '\n' +
          "    case 'decorators':\n" +
          '      {\n' +
          '        return value.forEach(function (decorator) {\n' +
          '          return addDecorator(decorator, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'loaders':\n" +
          '      {\n' +
          '        return value.forEach(function (loader) {\n' +
          '          return addLoader(loader, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'parameters':\n" +
          '      {\n' +
          '        return addParameters(_objectSpread({}, value), false);\n' +
          '      }\n' +
          '\n' +
          "    case 'argTypesEnhancers':\n" +
          '      {\n' +
          '        return value.forEach(function (enhancer) {\n' +
          '          return addArgTypesEnhancer(enhancer);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'globals':\n" +
          "    case 'globalTypes':\n" +
          '      {\n' +
          '        var v = {};\n' +
          '        v[key] = value;\n' +
          '        return addParameters(v, false);\n' +
          '      }\n' +
          '\n' +
          '    default:\n' +
          '      {\n' +
          '        // eslint-disable-next-line prefer-template\n' +
          "        return console.log(key + ' was not supported :( !');\n" +
          '      }\n' +
          '  }\n' +
          '});',
        '/Users/57block/Downloads/work/milton/stories/config/preview.js-generated-config-entry.js': 'function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n' +
          '\n' +
          'function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n' +
          '\n' +
          'function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n' +
          '\n' +
          '/* eslint-disable import/no-unresolved */\n' +
          "import { addDecorator, addParameters, addLoader, addArgTypesEnhancer } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-api';\n" +
          "import { logger } from '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-logger';\n" +
          "import * as config from '/Users/57block/Downloads/work/milton/stories/config/preview.js';\n" +
          'Object.keys(config).forEach(function (key) {\n' +
          '  var value = config[key];\n' +
          '\n' +
          '  switch (key) {\n' +
          "    case 'args':\n" +
          "    case 'argTypes':\n" +
          '      {\n' +
          "        return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));\n" +
          '      }\n' +
          '\n' +
          "    case 'decorators':\n" +
          '      {\n' +
          '        return value.forEach(function (decorator) {\n' +
          '          return addDecorator(decorator, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'loaders':\n" +
          '      {\n' +
          '        return value.forEach(function (loader) {\n' +
          '          return addLoader(loader, false);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'parameters':\n" +
          '      {\n' +
          '        return addParameters(_objectSpread({}, value), false);\n' +
          '      }\n' +
          '\n' +
          "    case 'argTypesEnhancers':\n" +
          '      {\n' +
          '        return value.forEach(function (enhancer) {\n' +
          '          return addArgTypesEnhancer(enhancer);\n' +
          '        });\n' +
          '      }\n' +
          '\n' +
          "    case 'globals':\n" +
          "    case 'globalTypes':\n" +
          '      {\n' +
          '        var v = {};\n' +
          '        v[key] = value;\n' +
          '        return addParameters(v, false);\n' +
          '      }\n' +
          '\n' +
          '    default:\n' +
          '      {\n' +
          '        // eslint-disable-next-line prefer-template\n' +
          "        return console.log(key + ' was not supported :( !');\n" +
          '      }\n' +
          '  }\n' +
          '});',
        '/Users/57block/Downloads/work/milton/stories/config/generated-stories-entry.js': '"use strict";\n' +
          '\n' +
          'var _frameworkImportPath = require("@storybook/react");\n' +
          '\n' +
          '/* eslint-disable import/no-unresolved */\n' +
          "(0, _frameworkImportPath.configure)([require.context('../../src/components/V2', true, /^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$/),require.context('../../src/services/Templates', true, /^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$/)], module, false);"
      }
    },
    HtmlWebpackPlugin {
      userOptions: {
        filename: 'iframe.html',
        chunksSortMode: 'none',
        alwaysWriteToDisk: true,
        inject: false,
        templateParameters: [Function: templateParameters],
        minify: {
          collapseWhitespace: true,
          removeComments: true,
          removeRedundantAttributes: true,
          removeScriptTypeAttributes: false,
          removeStyleLinkTypeAttributes: true,
          useShortDoctype: true
        },
        template: '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-common/dist/cjs/templates/index.ejs'
      },
      version: 5
    },
    DefinePlugin {
      definitions: {
        'process.env': {
          NODE_ENV: '"development"',
          NODE_PATH: '[]',
          STORYBOOK: '"true"',
          PUBLIC_URL: '"."'
        },
        NODE_ENV: '"development"'
      }
    },
    WatchMissingNodeModulesPlugin {
      nodeModulesPath: '/Users/57block/Downloads/work/milton/node_modules'
    },
    HotModuleReplacementPlugin { options: {} },
    CaseSensitivePathsPlugin {
      options: {},
      logger: {
        log: [Function: bound consoleCall],
        warn: [Function: bound consoleCall],
        dir: [Function: bound consoleCall],
        time: [Function: bound consoleCall],
        timeEnd: [Function: bound consoleCall],
        timeLog: [Function: bound consoleCall],
        trace: [Function: bound consoleCall],
        assert: [Function: bound consoleCall],
        clear: [Function: bound consoleCall],
        count: [Function: bound consoleCall],
        countReset: [Function: bound consoleCall],
        group: [Function: bound consoleCall],
        groupEnd: [Function: bound consoleCall],
        table: [Function: bound consoleCall],
        debug: [Function: bound consoleCall],
        info: [Function: bound consoleCall],
        dirxml: [Function: bound consoleCall],
        error: [Function: bound consoleCall],
        groupCollapsed: [Function: bound consoleCall],
        Console: [Function: Console],
        profile: [Function: profile],
        profileEnd: [Function: profileEnd],
        timeStamp: [Function: timeStamp],
        context: [Function: context],
        [Symbol(kBindStreamsEager)]: [Function: bound ],
        [Symbol(kBindStreamsLazy)]: [Function: bound ],
        [Symbol(kBindProperties)]: [Function: bound ],
        [Symbol(kWriteToConsole)]: [Function: bound ],
        [Symbol(kGetInspectOptions)]: [Function: bound ],
        [Symbol(kFormatForStdout)]: [Function: bound ],
        [Symbol(kFormatForStderr)]: [Function: bound ]
      },
      pathCache: Map {},
      fsOperations: 0,
      primed: false
    },
    ProgressPlugin {
      profile: false,
      handler: undefined,
      modulesCount: 5000,
      dependenciesCount: 10000,
      showEntries: true,
      showModules: true,
      showDependencies: true,
      showActiveModules: false,
      percentBy: undefined
    },
    DefinePlugin { definitions: { 'process.env': '{}' } },
    EmptyPlugin {},
    MiniCssExtractPlugin {
      options: {
        filename: '[name].css',
        moduleFilename: [Function: moduleFilename],
        ignoreOrder: false,
        chunkFilename: '[name].css'
      }
    }
  ],
  module: {
    rules: [
      {
        enforce: 'pre',
        test: /\.(js)$/,
        include: '/Users/57block/Downloads/work/milton/src',
        use: { loader: 'babel-loader' }
      },
      {
        exclude: [
          /\.html$/,
          /\.(js)(\?.*)?$/,
          /\.scss$/,
          /\.css$/,
          /\.json$/,
          /\.(png|jpe?g|gif|svg)$/,
          /\.(woff|woff2|eot|ttf|otf)$/
        ],
        use: { loader: 'url-loader', options: { limit: 10000 } }
      },
      {
        exclude: [ /index\.html/ ],
        test: /\.html$/,
        use: { loader: 'html-loader', options: { sources: false } }
      },
      {
        test: /\.scss?$/,
        use: [
          '/Users/57block/Downloads/work/milton/node_modules/mini-css-extract-plugin/dist/loader.js',
          { loader: 'css-loader', options: { sourceMap: true } },
          { loader: 'resolve-url-loader' },
          {
            loader: 'postcss-loader',
            options: {
              postcssOptions: { plugins: [ [ 'autoprefixer' ] ] }
            }
          },
          { loader: 'sass-loader', options: { sourceMap: true } },
          {
            loader: 'sass-resources-loader',
            options: {
              resources: '/Users/57block/Downloads/work/milton/src/styles/index.scss'
            }
          }
        ]
      },
      {
        test: /\.css$/,
        use: [
          '/Users/57block/Downloads/work/milton/node_modules/mini-css-extract-plugin/dist/loader.js',
          { loader: 'css-loader', options: { sourceMap: true } },
          {
            loader: 'postcss-loader',
            options: {
              postcssOptions: { plugins: [ [ 'autoprefixer' ] ] }
            }
          }
        ]
      },
      {
        test: /\.(png|jpe?g|gif|svg)$/,
        use: {
          loader: 'file-loader',
          options: { name: 'img/[name].[contenthash].[ext]' }
        }
      },
      {
        test: /\.(woff|woff2|eot|ttf|otf)$/,
        use: {
          loader: 'file-loader',
          options: { name: 'fonts/[name].[contenthash].[ext]' }
        }
      },
      {
        test: /\.(mjs|tsx?|jsx?)$/,
        use: [
          {
            loader: '/Users/57block/Downloads/work/milton/node_modules/babel-loader/lib/index.js',
            options: {
              cacheDirectory: '/Users/57block/Downloads/work/milton/node_modules/.cache/storybook/babel',
              sourceType: 'unambiguous',
              presets: [
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-env/lib/index.js',
                  { shippedProposals: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-typescript/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-react/lib/index.js',
                  { runtime: 'automatic' }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-flow/lib/index.js'
              ],
              plugins: [
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-shorthand-properties/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-block-scoping/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-decorators/lib/index.js',
                  { legacy: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-class-properties/lib/index.js',
                  { loose: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-private-methods/lib/index.js',
                  { loose: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-export-default-from/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-syntax-dynamic-import/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js',
                  { loose: true, useBuiltIns: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-classes/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-parameters/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-destructuring/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-spread/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-for-of/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-common/node_modules/babel-plugin-macros/dist/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/babel-plugin-polyfill-corejs3/lib/index.js',
                  {
                    method: 'usage-global',
                    absoluteImports: '/Users/57block/Downloads/work/milton/node_modules/core-js/index.js',
                    version: '3.11.0'
                  }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/babel-plugin-add-react-displayname/index.js'
              ],
              overrides: [
                {
                  test: /\.(mjs|jsx?)$/,
                  plugins: [
                    [
                      '/Users/57block/Downloads/work/milton/node_modules/babel-plugin-react-docgen/lib/index.js',
                      {
                        DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES'
                      }
                    ]
                  ]
                }
              ]
            }
          }
        ],
        include: [ '/Users/57block/Downloads/work/milton' ],
        exclude: /node_modules/
      },
      {
        test: /\.js$/,
        use: [
          {
            loader: '/Users/57block/Downloads/work/milton/node_modules/babel-loader/lib/index.js',
            options: {
              sourceType: 'unambiguous',
              presets: [
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-env/lib/index.js',
                  {
                    shippedProposals: true,
                    modules: false,
                    targets: 'defaults'
                  }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-react/lib/index.js'
              ],
              plugins: [
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-shorthand-properties/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-block-scoping/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-decorators/lib/index.js',
                  { legacy: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-class-properties/lib/index.js',
                  { loose: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-private-methods/lib/index.js',
                  { loose: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-export-default-from/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-syntax-dynamic-import/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js',
                  { loose: true, useBuiltIns: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-classes/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-parameters/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-destructuring/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-spread/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-for-of/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-common/node_modules/babel-plugin-macros/dist/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/babel-plugin-polyfill-corejs3/lib/index.js',
                  {
                    method: 'usage-global',
                    absoluteImports: '/Users/57block/Downloads/work/milton/node_modules/core-js/index.js',
                    version: '3.11.0'
                  }
                ]
              ]
            }
          }
        ],
        include: [Function: include]
      },
      {
        test: /\.md$/,
        use: [
          {
            loader: '/Users/57block/Downloads/work/milton/node_modules/raw-loader/dist/cjs.js'
          }
        ]
      },
      {
        test: /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/,
        loader: '/Users/57block/Downloads/work/milton/node_modules/file-loader/dist/cjs.js',
        options: { esModule: false, name: 'static/media/[path][name].[ext]' }
      },
      {
        test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/,
        loader: '/Users/57block/Downloads/work/milton/node_modules/@storybook/builder-webpack5/node_modules/url-loader/dist/cjs.js',
        options: { limit: 10000, name: 'static/media/[path][name].[ext]' }
      }
    ]
  },
  resolve: {
    extensions: [
      '.mjs', '.js',
      '.jsx', '.ts',
      '.tsx', '.json',
      '.cjs'
    ],
    modules: [ 'node_modules' ],
    mainFields: [ 'browser', 'module', 'main' ],
    alias: {
      '@emotion/core': '/Users/57block/Downloads/work/milton/node_modules/@emotion/core',
      '@emotion/styled': '/Users/57block/Downloads/work/milton/node_modules/@emotion/styled',
      'emotion-theming': '/Users/57block/Downloads/work/milton/node_modules/emotion-theming',
      '@storybook/addons': '/Users/57block/Downloads/work/milton/node_modules/@storybook/addons',
      '@storybook/api': '/Users/57block/Downloads/work/milton/node_modules/@storybook/api',
      '@storybook/channels': '/Users/57block/Downloads/work/milton/node_modules/@storybook/channels',
      '@storybook/channel-postmessage': '/Users/57block/Downloads/work/milton/node_modules/@storybook/channel-postmessage',
      '@storybook/components': '/Users/57block/Downloads/work/milton/node_modules/@storybook/components',
      '@storybook/core-events': '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-events',
      '@storybook/router': '/Users/57block/Downloads/work/milton/node_modules/@storybook/router',
      '@storybook/theming': '/Users/57block/Downloads/work/milton/node_modules/@storybook/theming',
      '@storybook/semver': '/Users/57block/Downloads/work/milton/node_modules/@storybook/semver',
      '@storybook/client-api': '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-api',
      '@storybook/client-logger': '/Users/57block/Downloads/work/milton/node_modules/@storybook/client-logger',
      react: '/Users/57block/Downloads/work/milton/node_modules/react',
      'react-dom': '/Users/57block/Downloads/work/milton/node_modules/react-dom',
      app: '/Users/57block/Downloads/work/milton/src/app',
      assets: '/Users/57block/Downloads/work/milton/src/assets',
      components: '/Users/57block/Downloads/work/milton/src/components',
      lib: '/Users/57block/Downloads/work/milton/src/lib',
      models: '/Users/57block/Downloads/work/milton/src/models',
      services: '/Users/57block/Downloads/work/milton/src/services',
      styles: '/Users/57block/Downloads/work/milton/src/styles',
      templates: '/Users/57block/Downloads/work/milton/src/templates',
      config: '/Users/57block/Downloads/work/milton/public/undefined-config.json'
    },
    plugins: [
      {
        apply: [Function: nothing],
        makePlugin: [Function],
        moduleLoader: [Function],
        topLevelLoader: { apply: [Function: nothing] },
        bind: [Function],
        tsLoaderOptions: [Function],
        forkTsCheckerOptions: [Function]
      }
    ],
    fallback: { path: false, fs: false, net: false, tls: false }
  },
  resolveLoader: { plugins: [ { apply: [Function: nothing] } ] },
  optimization: {
    splitChunks: { chunks: 'all' },
    runtimeChunk: true,
    sideEffects: true,
    usedExports: true,
    minimizer: []
  },
  performance: { hints: false }
}
WARN unable to find package.json for mustache
Manager webpack config
{
  name: 'manager',
  mode: 'development',
  bail: false,
  devtool: false,
  entry: [
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-server/dist/cjs/globals/polyfills.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-client/dist/esm/manager/index.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-actions/dist/esm/register.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-links/dist/esm/register.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-notes/register.js',
    '/Users/57block/Downloads/work/milton/node_modules/@storybook/addon-knobs/dist/esm/register.js',
    '/Users/57block/Downloads/work/milton/stories/config/generated-refs.js'
  ],
  output: {
    path: '/Users/57block/Downloads/work/milton/node_modules/.cache/storybook/public',
    filename: '[name].manager.bundle.js',
    publicPath: ''
  },
  watchOptions: { aggregateTimeout: 2000, ignored: /node_modules/ },
  plugins: [
    VirtualModulesPlugin {
      _staticModules: {
        '/Users/57block/Downloads/work/milton/stories/config/generated-refs.js': '"use strict";\n' +
          '\n' +
          'var _addons = require("@storybook/addons");\n' +
          '\n' +
          '_addons.addons.setConfig({\n' +
          '  refs: {}\n' +
          '});'
      }
    },
    HtmlWebpackPlugin {
      options: {
        template: '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-common/dist/cjs/templates/index.ejs',
        templateContent: false,
        templateParameters: [Function: templateParameters],
        filename: 'index.html',
        publicPath: 'auto',
        hash: false,
        inject: false,
        scriptLoading: 'blocking',
        compile: true,
        favicon: false,
        minify: 'auto',
        cache: true,
        showErrors: true,
        chunks: 'all',
        excludeChunks: [],
        chunksSortMode: 'none',
        meta: {},
        base: false,
        title: 'Webpack App',
        xhtml: false,
        alwaysWriteToDisk: true
      },
      childCompilerHash: undefined,
      assetJson: undefined,
      hash: undefined,
      version: 4
    },
    CaseSensitivePathsPlugin {
      options: {},
      logger: {
        log: [Function: bound consoleCall],
        warn: [Function: bound consoleCall],
        dir: [Function: bound consoleCall],
        time: [Function: bound consoleCall],
        timeEnd: [Function: bound consoleCall],
        timeLog: [Function: bound consoleCall],
        trace: [Function: bound consoleCall],
        assert: [Function: bound consoleCall],
        clear: [Function: bound consoleCall],
        count: [Function: bound consoleCall],
        countReset: [Function: bound consoleCall],
        group: [Function: bound consoleCall],
        groupEnd: [Function: bound consoleCall],
        table: [Function: bound consoleCall],
        debug: [Function: bound consoleCall],
        info: [Function: bound consoleCall],
        dirxml: [Function: bound consoleCall],
        error: [Function: bound consoleCall],
        groupCollapsed: [Function: bound consoleCall],
        Console: [Function: Console],
        profile: [Function: profile],
        profileEnd: [Function: profileEnd],
        timeStamp: [Function: timeStamp],
        context: [Function: context],
        [Symbol(kBindStreamsEager)]: [Function: bound ],
        [Symbol(kBindStreamsLazy)]: [Function: bound ],
        [Symbol(kBindProperties)]: [Function: bound ],
        [Symbol(kWriteToConsole)]: [Function: bound ],
        [Symbol(kGetInspectOptions)]: [Function: bound ],
        [Symbol(kFormatForStdout)]: [Function: bound ],
        [Symbol(kFormatForStderr)]: [Function: bound ]
      },
      pathCache: Map {},
      fsOperations: 0,
      primed: false
    },
    DefinePlugin { definitions: {} },
    DefinePlugin {
      definitions: {
        'process.env': {
          NODE_ENV: '"development"',
          NODE_PATH: '[]',
          STORYBOOK: '"true"',
          PUBLIC_URL: '"."'
        },
        NODE_ENV: '"development"'
      }
    }
  ],
  module: {
    rules: [
      {
        test: /\.(mjs|tsx?|jsx?)$/,
        use: [
          {
            loader: '/Users/57block/Downloads/work/milton/node_modules/babel-loader/lib/index.js',
            options: {
              sourceType: 'unambiguous',
              presets: [
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-env/lib/index.js',
                  { shippedProposals: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-typescript/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-react/lib/index.js'
              ],
              plugins: [
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-shorthand-properties/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-block-scoping/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-decorators/lib/index.js',
                  { legacy: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-class-properties/lib/index.js',
                  { loose: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-private-methods/lib/index.js',
                  { loose: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-export-default-from/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-syntax-dynamic-import/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js',
                  { loose: true, useBuiltIns: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-classes/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-parameters/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-destructuring/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-spread/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-for-of/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-common/node_modules/babel-plugin-macros/dist/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/babel-plugin-polyfill-corejs3/lib/index.js',
                  {
                    method: 'usage-global',
                    absoluteImports: '/Users/57block/Downloads/work/milton/node_modules/core-js/index.js',
                    version: '3.11.0'
                  }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-template-literals/lib/index.js'
              ]
            }
          }
        ],
        include: [ '/Users/57block/Downloads/work/milton' ],
        exclude: [ /node_modules/, /dist/ ]
      },
      {
        test: /\.js$/,
        use: [
          {
            loader: '/Users/57block/Downloads/work/milton/node_modules/babel-loader/lib/index.js',
            options: {
              sourceType: 'unambiguous',
              presets: [
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-env/lib/index.js',
                  {
                    shippedProposals: true,
                    modules: false,
                    targets: 'defaults'
                  }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/preset-react/lib/index.js'
              ],
              plugins: [
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-shorthand-properties/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-block-scoping/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-decorators/lib/index.js',
                  { legacy: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-class-properties/lib/index.js',
                  { loose: true }
                ],
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-private-methods/lib/index.js',
                  { loose: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-export-default-from/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-syntax-dynamic-import/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js',
                  { loose: true, useBuiltIns: true }
                ],
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-classes/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-parameters/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-destructuring/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-spread/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-transform-for-of/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-common/node_modules/babel-plugin-macros/dist/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js',
                '/Users/57block/Downloads/work/milton/node_modules/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js',
                [
                  '/Users/57block/Downloads/work/milton/node_modules/babel-plugin-polyfill-corejs3/lib/index.js',
                  {
                    method: 'usage-global',
                    absoluteImports: '/Users/57block/Downloads/work/milton/node_modules/core-js/index.js',
                    version: '3.11.0'
                  }
                ]
              ]
            }
          }
        ],
        include: [Function: include]
      },
      {
        test: /\.css$/,
        use: [
          '/Users/57block/Downloads/work/milton/node_modules/style-loader/dist/cjs.js',
          {
            loader: '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-server/node_modules/css-loader/dist/cjs.js',
            options: { importLoaders: 1 }
          }
        ]
      },
      {
        test: /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/,
        loader: '/Users/57block/Downloads/work/milton/node_modules/file-loader/dist/cjs.js',
        options: { name: 'static/media/[path][name].[ext]' }
      },
      {
        test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/,
        loader: '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-server/node_modules/url-loader/dist/cjs.js',
        options: { limit: 10000, name: 'static/media/[path][name].[ext]' }
      }
    ]
  },
  resolve: {
    extensions: [
      '.mjs', '.js',
      '.jsx', '.json',
      '.cjs', '.ts',
      '.tsx'
    ],
    modules: [ 'node_modules' ],
    mainFields: [ 'browser', 'module', 'main' ],
    alias: {
      '@emotion/core': '/Users/57block/Downloads/work/milton/node_modules/@emotion/core',
      '@emotion/styled': '/Users/57block/Downloads/work/milton/node_modules/@emotion/styled',
      'emotion-theming': '/Users/57block/Downloads/work/milton/node_modules/emotion-theming',
      '@storybook/addons': '/Users/57block/Downloads/work/milton/node_modules/@storybook/addons',
      '@storybook/api': '/Users/57block/Downloads/work/milton/node_modules/@storybook/api',
      '@storybook/channels': '/Users/57block/Downloads/work/milton/node_modules/@storybook/channels',
      '@storybook/components': '/Users/57block/Downloads/work/milton/node_modules/@storybook/components',
      '@storybook/core-events': '/Users/57block/Downloads/work/milton/node_modules/@storybook/core-events',
      '@storybook/router': '/Users/57block/Downloads/work/milton/node_modules/@storybook/router',
      '@storybook/theming': '/Users/57block/Downloads/work/milton/node_modules/@storybook/theming',
      '@storybook/ui': '/Users/57block/Downloads/work/milton/node_modules/@storybook/ui',
      react: '/Users/57block/Downloads/work/milton/node_modules/react',
      'react-dom': '/Users/57block/Downloads/work/milton/node_modules/react-dom'
    },
    plugins: [
      {
        apply: [Function: nothing],
        makePlugin: [Function],
        moduleLoader: [Function],
        topLevelLoader: { apply: [Function: nothing] },
        bind: [Function],
        tsLoaderOptions: [Function],
        forkTsCheckerOptions: [Function]
      }
    ]
  },
  resolveLoader: { plugins: [ { apply: [Function: nothing] } ] },
  recordsPath: '/Users/57block/Downloads/work/milton/node_modules/.cache/storybook/public/records.json',
  performance: { hints: false },
  optimization: {
    splitChunks: { chunks: 'all' },
    runtimeChunk: true,
    sideEffects: true,
    usedExports: true,
    concatenateModules: true,
    minimizer: []
  }
}

@timkindberg
Copy link
Contributor

timkindberg commented May 3, 2021

I'm having this issue as well. For some reason it's also printing out a bunch of JS. It's happening after upgrading to v6.2.9 to try and get Webpack 5 working.

  • "webpack": "^5.36.2"
  • "@babel/core": "^7.14.0"
  • "@storybook/addon-actions": "^6.2.9",
    "@storybook/addon-docs": "^6.2.9",
    "@storybook/addon-knobs": "^6.2.9",
    "@storybook/addon-links": "^6.2.9",
    "@storybook/addon-storysource": "^6.2.9",
    "@storybook/addons": "^6.2.9",
    "@storybook/builder-webpack5": "^6.2.9",
    "@storybook/react": "^6.2.9",
    "@storybook/theming": "^6.2.9",

Storybook CLI Output

> start-storybook -p 6006 -s ./static,"./static/images:/static/images"

info @storybook/react v6.2.9
info
babelConfig {
  presets: [ [ 'next/babel', [Object] ], '@emotion/babel-preset-css-prop' ],
  plugins: [ 'lodash' ],
  env: { development: { plugins: [Array] } }
}
info => Loading presets
info => Serving static files from ././static at /
info => Serving static files from ././static/images at /static/images
info => Loading 1 config file in ".storybook"
info => Loading custom manager config
WARN unable to find package.json for @chakra-ui/icons
WARN unable to find package.json for @chakra-ui/react
WARN unable to find package.json for @chakra-ui/theme-tools
info => Loading custom manager config
info => Adding stories defined in ".storybook/main.js"
info => Using implicit CSS loaders
info => Using default Webpack5 setup
preview Write virtual module: .storybook/storybook-init-framework-entry.js import '@storybook/react';
preview Write virtual module: .storybook/preview.js-generated-config-entry.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/* eslint-disable import/no-unresolved */
import { addDecorator, addParameters, addLoader, addArgTypesEnhancer } from '@storybook/client-api';
import { logger } from '@storybook/client-logger';
import * as config from '.storybook/preview.js';
Object.keys(config).forEach(function (key) {
  var value = config[key];

  switch (key) {
    case 'args':
    case 'argTypes':
      {
        return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));
      }

    case 'decorators':
      {
        return value.forEach(function (decorator) {
          return addDecorator(decorator, false);
        });
      }

    case 'loaders':
      {
        return value.forEach(function (loader) {
          return addLoader(loader, false);
        });
      }

    case 'parameters':
      {
        return addParameters(_objectSpread({}, value), false);
      }

    case 'argTypesEnhancers':
      {
        return value.forEach(function (enhancer) {
          return addArgTypesEnhancer(enhancer);
        });
      }

    case 'globals':
    case 'globalTypes':
      {
        var v = {};
        v[key] = value;
        return addParameters(v, false);
      }

    default:
      {
        // eslint-disable-next-line prefer-template
        return console.log(key + ' was not supported :( !');
      }
  }
});
preview Write virtual module: .storybook/generated-stories-entry.js "use strict";

var _frameworkImportPath = require("@storybook/react");

/* eslint-disable import/no-unresolved */
(0, _frameworkImportPath.configure)([require.context('../assets/js', true, /^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)ActionBar\.stories\.(js|jsx|tsx|mdx))$/)], module, false);
<i> [webpack-dev-middleware] wait until bundle finished
10% building 0/1 entries 0/0 dependencies 0/0 modulesinfo => Using cached manager
99% done plugins webpack-hot-middlewarewebpack built preview 8536a88555f8a62e60d6 in 7803ms
╭────────────────────────────────────────────────────╮
│                                                    │
│   Storybook 6.2.9 started                          │
│   8.45 s for preview                               │
│                                                    │
│    Local:            http://localhost:6006/        │
│    On your network:  http://192.168.86.30:6006/    │
│                                                    │
╰────────────────────────────────────────────────────╯
<i> [webpack-dev-middleware] wait until bundle finished: /
99% done plugins webpack-hot-middlewarewebpack built preview 077f393731c4855157e5 in 1180ms

Storybook Config

/* eslint-disable @typescript-eslint/no-var-requires,no-param-reassign */
const path = require('path')
const _ = require('lodash')
const babelConfig = require('../.babelrc')

console.log('babelConfig', babelConfig)

const toPath = _path => path.join(process.cwd(), _path)
const isDev = process.env.NODE_ENV === 'development'

module.exports = {
  core: {
    builder: 'webpack5'
  },
  // reactOptions: {
  //   fastRefresh: true
  // },
  stories: [`../assets/js/**/ActionBar.stories.@(js|jsx|tsx|mdx)`],
  typescript: { reactDocgen: isDev ? 'react-docgen' : 'react-docgen-typescript-plugin' },
  // addons: [
  //   '@storybook/addon-docs',
  //   '@storybook/addon-knobs/register',
  //   '@storybook/addon-actions',
  //   '@storybook/addon-links',
  //   '@storybook/addon-storysource'
  // ],
  async babel(options) {
    return babelConfig
  },
  webpackFinal: async config => {
    // add path aliases
    config.resolve.alias = {
      ...config.resolve.alias,
      '~': path.resolve(__dirname, '../assets/js')
      //   '@emotion/core': toPath('node_modules/@emotion/react'),
      //   '@emotion/styled': toPath('node_modules/@emotion/styled'),
      //   '@emotion/babel-preset-babel': toPath('node_modules/@emotion/babel-preset-babel'),
      //   'emotion-theming': toPath('node_modules/@emotion/react')
    }
    // config.resolve.fallback = { fs: false, net: false, tty: false, stream: false, path: false, crypto: false }

    // config.module.rules.push(
    //   // See: https://github.com/webpack/webpack/issues/11467
    //   { test: /\.m?js/, resolve: { fullySpecified: false } }
    // )
    // config.module.rules.push({
    //   test: /\.s?css$/,
    //   use: ['style-loader', 'css-loader', 'sass-loader'],
    //   include: [path.resolve(__dirname, '../assets/js')]
    // })

    return config
  },
  managerWebpack: async config => {
    // add path aliases
    config.resolve.alias = {
      ...config.resolve.alias,
      '~': path.resolve(__dirname, '../assets/js')
    }
    return config
  }
}

image

@itzjonas
Copy link
Contributor

itzjonas commented May 4, 2021

My issue is similar to @andy-57blocks running everything at v6.2.9. I get the infamous:

[webpack-dev-middleware] wait until bundle finished: /
99% done plugins webpack-hot-middlewarewebpack built preview 768e0d44337dbfbd139d in 1081ms

Then a blank storybook page loads with some errors in the vendors-node_modules….iframe.bundle.js and main.iframe.bundle.js files. My point in upgrading is because I'm using the new v8.x of less-loader. App builds fine otherwise.

image

FWIW, I do also get a ton of warnings about:

Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-methods.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
        ["@babel/plugin-proposal-private-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config.

@emilio-martinez
Copy link
Contributor

I'm also getting those warnings about @babel/plugin-proposal-private-private-property-in-object – does anyone have insight on that @babel/preset-env-related issue and know if it's relevant?

@karol-f
Copy link

karol-f commented May 4, 2021

I have the same problem as @itzjonas (#14405 (comment)) and @kucheruk (#14405 (comment)) - 99% and Uncaught SyntaxError: Unexpected token ':' in browser's console.

@timkindberg
Copy link
Contributor

I also got a TON of "loose" messages... tried to shut them up but no success.

@kucheruk
Copy link

kucheruk commented May 7, 2021

Uncaught SyntaxError: Unexpected token ':'
Uncaught SyntaxError: Unexpected token ':'

@Marcuse7
Copy link

I have the same issue but cannot provide a public demo repo as I don't own the code. Would a private repo do, perhaps?

@smurrayatwork
Copy link

I was having the same issue myself. I noticed that the manager is cached when running start-storybook, so I deleted node_modules/.cache/storybook and then ran start-storybook again to let the manager rebuild. This fixed the issue for me.

@timkindberg
Copy link
Contributor

That's odd because I rm -rf node_modules multiple times and npm i fresh. And I was still having the issue. So not sure how deleting the cache would have fixed it.

@Marcuse7
Copy link

Agree with @timkindberg but @smurrayatwork's seems to work fine for me. Ensure your node modules are not too old (I upgraded sass-loader, postcss-sass, html-webpack-plugin, dotenv-webpack, builder-webpack5, and @storybook/addons) and update webpack5, too. I then deleted the complete node_modules with all subfolders before starting Storybook.

@smurrayatwork
Copy link

Sorry, I should have listed the dependencies I'm using that got this working!

    "@babel/cli": "^7.13.16",
    "@babel/core": "^7.13.16",
    "@babel/preset-env": "^7.13.15",
    "@babel/preset-react": "^7.13.13",
    "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
    "@storybook/addon-actions": "^6.3.0-alpha.24",
    "@storybook/addon-essentials": "^6.3.0-alpha.24",
    "@storybook/addon-links": "^6.3.0-alpha.24",
    "@storybook/builder-webpack5": "^6.3.0-alpha.24",
    "@storybook/react": "^6.3.0-alpha.24",
    "babel-loader": "^8.2.2",
    "css-loader": "^5.2.4",
    "dotenv-webpack": "^7.0.2",
    "html-webpack-plugin": "^5.3.1",
    "react-refresh": "^0.10.0",
    "style-loader": "^2.0.0",
    "webpack": "^5.37.0",
    "webpack-cli": "^4.6.0",
    "webpack-dev-middleware": "^4.2.0",

@martinsuba
Copy link

martinsuba commented Jul 8, 2021

After upgrading to 6.4.0-alpha.12 and webpack 5 I'm facing this issue with 99% and loader on the web page. In the console on the web page I have this error:

Uncaught Error: Singleton client API not yet initialized, cannot call addDecorator
    at addDecorator (vendors-shared_node_modules_urijs_src_URI_js-node_modules_sambego_storybook-state_dist_index_-d72d7f.iframe.bundle.js:8517)
    at main.iframe.bundle.js:1406
    at Array.forEach (<anonymous>)
    at main.iframe.bundle.js:1405
    at Array.forEach (<anonymous>)
    at Object../.storybook/preview.tsx-generated-config-entry.js (main.iframe.bundle.js:1393)
    at __webpack_require__ (runtime~main.iframe.bundle.js:28)
    at __webpack_exec__ (main.iframe.bundle.js:20255)
    at main.iframe.bundle.js:20256
    at Function.__webpack_require__.O (runtime~main.iframe.bundle.js:77)

I've updated all my dependencies to latest version and also tried to clear and install node_modules several times.
I was also experiencing this error with webpack 4 after upgrading from 6.1.11. to 6.3.2.

@shilman
Copy link
Member

shilman commented Jul 8, 2021

@martinsuba do you have a reproduction repo or can you create one by running npx sb@next repro, following the instructions, and linking it here? Thank you! 🙏

@liby
Copy link

liby commented Jul 26, 2021

@shilman
Take a look at this repo.

@Niznikr
Copy link

Niznikr commented Jul 29, 2021

Running into the same issue using Yarn 3. @liby reproduction captures roughly the same setup.

@liby
Copy link

liby commented Jul 29, 2021

@shilman
PTAL.

@Niznikr
Copy link

Niznikr commented Aug 2, 2021

What's interesting in our case (relevant PR here) is that the React Storybook starts up fine, it's the web components one that does not and I suspect it might be because of its direct dependency to @storybook/client-api. Perhaps yarn 2+ is handling multiple instances of @storybook/client-api differently than yarn 1.

@OllyHodgson
Copy link

I was getting stuck at 58%. In my case .storybook/.babelrc file had a load of plugins defined. For reasons I don't fully comprehend, removing those meant Storybook could get past 58% complete and render correctly. It now looks like this:

{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": []
}

Oddly enough, it only failed on my local dev machine - CI always worked perfectly.

@neirongkuifa
Copy link

neirongkuifa commented Jun 10, 2022

I hope the following solution will provide some insights if you're using customized ejected cra.

  1. webpack#using-your-existing-config is misleading. Spreading the rules directly won't work. You need to use this processCraConfig.ts helper function to process your webpack config and it will return you the valid rules to merge.

  2. After merging rules, you'll also need to merge plugins. Again, just spread two plugins and merge won't work. cra webpack config ReactRefreshPlugin is using webpack-dev-server sock integration. We need to replace it with webpack-hot-middleware sock integration. Otherwise it will throw error. So here you need another helper mergePlugins.ts

@shilman There're too many hidden details. I hope this can be documented somewhere since people do customize cra by ejecting.

Here's the snippet that's working for me:

const custom = require("../config/webpack.config")("development");
const { processCraConfig } = require("./helpers/processCraConfig.js");
const { mergePlugins } = require("./helpers/mergePlugins.js");
module.exports = {
	"stories": [
		"../src/**/*.stories.mdx",
		"../src/**/*.stories.@(js|jsx|ts|tsx)",
	],
	"addons": [
		"@storybook/addon-links",
		"@storybook/addon-essentials",
		"@storybook/addon-interactions",
	],
	"framework": "@storybook/react",
	"core": {
		"builder": "@storybook/builder-webpack5",
	},
	webpackFinal: async (config, options) => {
		config.module = {
			...config.module,
			// rules: [...config.module.rules],
			rules: [
				// Your webpack config won't process .md or .mdx since no such loader
				// So let these files go to storybook webpack config, and all other files go to your cra webpack config
				...config.module.rules.filter(
					({ test }) =>
						test instanceof RegExp &&
						test &&
						(test.test(".md") ||
							test.test(".mdx") ||
							test.test(".stories.md") ||
							test.test(".stories.mdx"))
				),
				...processCraConfig(custom, options),
			],
		};
		console.log("config", config.module.rules);
		// Merge cra webpack plugins with storybook webpack plugins
		config.plugins = mergePlugins(...config.plugins, ...custom.plugins);
		return config;
	},
};

@hutber
Copy link

hutber commented Jul 7, 2022

Humm interestingly, I did not have this error until I upgraded to 6.5.9, from 6.4. I am just confirming this is the case though.

@mleclercq
Copy link

I faced a similar issue and it turned out that it was caused by #16827 and had nothing to do with "99%".

The last log I got from storybook build was:

99% done plugins webpack-hot-middlewarewebpack built preview 677c8753ed6410cfbcb6 in 1615ms

And the Storybook page was freezing. But, it turns out that at least in my case, it had nothing to do with the "99%". Webpack build was completed, it just so happens that webpack progress never reports 100%, so the 99% stays in the console.

After some debug I found that react-element-to-jsx-string was going in a loop for one of my stories and stumbled upon #16827. The work around proposed in that bug worked for me: force the resolution of react-element-to-jsx-string to 14.3.2 in package.json:

  "resolutions": {
    "react-element-to-jsx-string": "14.3.2"
  }

I hope it helps.

@sbaechler
Copy link

  "resolutions": {
    "react-element-to-jsx-string": "14.3.2"
  }

Unfortunately didn't fix it for me. Neither did "react-element-to-jsx-string": "^15.0.0"

@iamyoki
Copy link

iamyoki commented Aug 11, 2022

Same here, it happens when using CRA.
Step to reproduce

yarn create react-app try-storybook
...
cd try-storybook
...
npx storybook init
...
yarn storybook
...
╭──────────────────────────────────────────────────╮
│                                                  │
│   Storybook 6.5.10 for React started             │
│   7.93 s for preview                             │
│                                                  │
│    Local:            http://localhost:6006/      │
│    On your network:  http://192.168.1.6:6006/    │
│                                                  │
╰──────────────────────────────────────────────────╯
<i> [webpack-dev-middleware] wait until bundle finished: /runtime_main.2a33b5bbf035974def14.hot-update.json
<i> [webpack-dev-middleware] wait until bundle finished: /?path=/story/components-image--image
99% done plugins webpack-hot-middlewarewebpack built preview 2a33b5bbf035974def14 in 397ms

@denkrasnov
Copy link

denkrasnov commented Aug 14, 2022

I had an attempt to update the Storybook and use webpack5 and faced the same issue. The issue is easily reproducible with storybook 6.5.10. I have created a repository to reproduce by running npx sb@next repro like it was suggested. Here is the repository: https://github.com/denkrasnov/storybook-wait-issue

manager (webpack 5.74.0) compiled successfully in 4891 ms
99% done plugins webpack-hot-middlewarewebpack built preview 28f84f13ee11ba1665d5 in 5079ms
╭─────────────────────────────────────────────────────╮
│                                                     │
│   Storybook 6.5.10 for React started                │
│   5.21 s for manager and 5.29 s for preview         │
│                                                     │
│    Local:            http://localhost:6006/         │
│    On your network:  http://192.168.68.113:6006/    │
│                                                     │
╰─────────────────────────────────────────────────────╯
<i> [webpack-dev-middleware] wait until bundle finished: /iframe.html?viewMode=story&id=example-page--logged-in&args=
<i> [webpack-dev-middleware] wait until bundle finished: /?path=/story/example-page--logged-in
99% done plugins webpack-hot-middlewarewebpack built preview 5f390fbb077d6be2e6d9 in 167ms

@gurigothrive
Copy link

I was facing the space issue and now resolved.

I saw my recent commit history and found some of the packages were automatically downgraded to previous version. So I have revert the commit, and it's working.

Below is old commit, which was creating issue:

"@storybook/addon-essentials": "^6.4.22",
"@storybook/preset-create-react-app": "^1.2.0",
"@storybook/react": "^6.1.21",

Below is latest commit, and which resolved the issue:

"@storybook/addon-essentials": "^6.5.9",
"@storybook/preset-create-react-app": "^4.1.2",
"@storybook/react": "^6.5.9",

@EldinZaimovic
Copy link

Same here

node@c1c199f91c8c:/app$ npm run storybook

> storybook
> start-storybook -p 6006

info @storybook/react v6.5.12
info
info => Loading presets
info Addon-docs: using MDX1
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 e3073b13dc773b097fa0 in 6115ms
╭─────────────────────────────────────────────────╮
│                                                 │
│   Storybook 6.5.12 for React started            │
│   6.34 s for preview                            │
│                                                 │
│    Local:            http://localhost:6006/     │
│    On your network:  http://172.19.1.3:6006/    │
│                                                 │
╰─────────────────────────────────────────────────╯
99% done plugins webpack-hot-middlewarewebpack built preview 2dc4d6562d583e1940de in 646ms

@Andrew-Kovalenko
Copy link

@shilman Any progress on it? Problem still reprodusing for me with webpack 5 and module federation

...
 "@storybook/addon-actions": "^6.5.12",
  "@storybook/addon-essentials": "^6.5.12",
  "@storybook/addon-interactions": "^6.5.12",
  "@storybook/addon-links": "^6.5.12",
  "@storybook/builder-webpack5": "^6.5.12",
  "@storybook/manager-webpack5": "^6.5.12",
  "@storybook/react": "^6.5.12",
  ...

Copy link
Member

shilman commented Oct 24, 2022

AFAICT this isn't an error. For example, in the second to last comment:

99% done plugins webpack-hot-middlewarewebpack built preview 2dc4d6562d583e1940de in 646ms

It prints out 99% done, and then prints out "built preview", which means that it's 100% complete. We should provide better debugging tools for Webpack users, but the "99% complete" is a red herring. Closing this.

@shilman shilman closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2022
@denkrasnov
Copy link

denkrasnov commented Oct 24, 2022

Hello @shilman thanks for your reply and your time.
I have provided a repro repository with the only storybook installed and the issue is present there and doesn't resolve.
#14405 (comment)

Screenshot 2022-10-24 at 15 30 37

Copy link
Member

shilman commented Oct 24, 2022

@denkrasnov Your repro works fine for me. What is the output of npx sb info on your machine?

@denkrasnov
Copy link

denkrasnov commented Oct 24, 2022

@shilman

storybook-wait-issue git:(master) ✗ npx sb info

Environment Info:

  System:
    OS: macOS 12.6
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 3.2.2 - ~/.nvm/versions/node/v16.16.0/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  Browsers:
    Chrome: 106.0.5249.119
    Safari: 16.0
  npmPackages:
    @storybook/addon-actions: ^6.5.10 => 6.5.10 
    @storybook/addon-docs: ^6.5.10 => 6.5.10 
    @storybook/addon-essentials: ^6.5.10 => 6.5.10 
    @storybook/addon-interactions: ^6.5.10 => 6.5.10 
    @storybook/addon-links: ^6.5.10 => 6.5.10 
    @storybook/builder-webpack4: ^6.5.10 => 6.5.10 
    @storybook/builder-webpack5: 6.5.10 => 6.5.10 
    @storybook/manager-webpack4: ^6.5.10 => 6.5.10 
    @storybook/manager-webpack5: 6.5.10 => 6.5.10 
    @storybook/react: ^6.5.10 => 6.5.10 
    @storybook/testing-library: ^0.0.13 => 0.0.13 ```

Copy link
Member

shilman commented Oct 24, 2022

@denkrasnov here's mine. looks pretty damn close...

Environment Info:

  System:
    OS: macOS 12.6
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 3.2.2 - /usr/local/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 106.0.5249.119
    Safari: 16.0
  npmPackages:
    @storybook/addon-actions: ^6.5.10 => 6.5.10
    @storybook/addon-docs: ^6.5.10 => 6.5.10
    @storybook/addon-essentials: ^6.5.10 => 6.5.10
    @storybook/addon-interactions: ^6.5.10 => 6.5.10
    @storybook/addon-links: ^6.5.10 => 6.5.10
    @storybook/builder-webpack4: ^6.5.10 => 6.5.10
    @storybook/builder-webpack5: 6.5.10 => 6.5.10
    @storybook/manager-webpack4: ^6.5.10 => 6.5.10
    @storybook/manager-webpack5: 6.5.10 => 6.5.10
    @storybook/react: ^6.5.10 => 6.5.10
    @storybook/testing-library: ^0.0.13 => 0.0.13

@berkeleycole
Copy link

The above are very close to my versions as well. I had the same issue as original poster. I upgraded my yarn packages, removed the storybook cache, removed the whole node modules folder, tweaked libraries, tried lots of things but couldn't get it to load past 99% and none of my components showed in the UI though the rest of the app loaded successfully. There were also no errors in terminal, code, or app console.

Finally, I started a new branch, re-installed storybook from the beginning with npx storybook init (previously I had been working off another person's branch, everything installed via yarn). And it worked fine. I think this has to be a tricky and subtle versioning issue, I had been messing with the mui vs mui5 addon so I'm assuming somewhere in that process something got off track.

So - I got past this issue, best advice I can give for a solution is take note of the addons you want, and try a fresh install.

@alexgorbatchev
Copy link

I found that my storybook was hanging because of @babel/plugin-proposal-decorators in babel config file.

@riethmue
Copy link

riethmue commented Nov 30, 2022

Same issue for me

System:
   OS: macOS 12.5.1
   CPU: (10) arm64 Apple M1 Pro
 Binaries:
   Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
   npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
 Browsers:
   Chrome: 107.0.5304.121
   Firefox: 106.0.3
   Safari: 15.6.1
 npmPackages:
   @storybook/addon-actions: ^6.5.13 => 6.5.13 
   @storybook/addon-essentials: ^6.5.13 => 6.5.13 
   @storybook/addon-interactions: ^6.5.13 => 6.5.13 
   @storybook/addon-links: ^6.5.13 => 6.5.13 
   @storybook/angular: ^6.5.13 => 6.5.13 
   @storybook/builder-webpack5: ^6.5.13 => 6.5.13 
   @storybook/manager-webpack5: ^6.5.13 => 6.5.13 
   @storybook/testing-library: ^0.0.13 => 0.0.13 

@SRochas
Copy link

SRochas commented Dec 23, 2022

I experienced this issue after renaming some of my files. For me the solution was to delete the storybook-static files as I suspect Storybook was caching the old file names. I also deleted node_modules for good measure, but it's likely not needed in my case as I didn't modify my package.json.

Doing the following steps resolved the issue for me (replace 'pnpm' with your package manager of choice):

rm -rf storybook-static node_modules
pnpm install
pnpm build-storybook
pnpm storybook

@Jero786
Copy link

Jero786 commented Feb 23, 2023

I still have the same issue ("storybook": "7.0.0-beta.53")

@Lighttree
Copy link

For those who have the issue. If you have the webpackFinal function in the .storybook/main.js you can try to investigate this place.

What happened in my case we bloated the Storybook default resolve object.

When I replaced this:

webpackFinal: async (config, { configType }) => {
    return {
      ...
      resolve: devConfig.resolve,
      ...
    };
  },

With this:

      resolve: {
        ...config.resolve,
        alias: {
          ...config.resolve.alias,
          ...devConfig.resolve.alias,
        },
      },

This helped. This can happen with other custom configuration fields, so just make sure you are not "overriding" important parts of the configuration.

@christocarr
Copy link

I am having this issue with v7.0.12

@migueljolv
Copy link

migueljolv commented Jun 21, 2023

For those who have the issue. If you have the webpackFinal function in the .storybook/main.js you can try to investigate this place.

What happened in my case we bloated the Storybook default resolve object.

When I replaced this:

webpackFinal: async (config, { configType }) => {
    return {
      ...
      resolve: devConfig.resolve,
      ...
    };
  },

With this:

      resolve: {
        ...config.resolve,
        alias: {
          ...config.resolve.alias,
          ...devConfig.resolve.alias,
        },
      },

This helped. This can happen with other custom configuration fields, so just make sure you are not "overriding" important parts of the configuration.

Thank you! this fixed my issue

@b-d-m-p b-d-m-p mentioned this issue Jul 6, 2023
1 task
@Stephen2
Copy link

Stephen2 commented Aug 7, 2023

For those who have the issue. If you have the webpackFinal function in the .storybook/main.js you can try to investigate this place.

This helped. This can happen with other custom configuration fields, so just make sure you are not "overriding" important parts of the configuration.

Thank you @Lighttree - you got it fixed for me!

@RLweedJr
Copy link

RLweedJr commented Nov 4, 2023

FYI: Kernel Problems This happened when after the update Kernel 6.5.9-200.fc38.x86_64

kernel problem occurred, but your kernel has been tainted (flags:GW). Explanation:
W - Taint on warning.
Kernel maintainers are unable to diagnose tainted reports.
WARNING: CPU: 1 PID: 89 at drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:1274 __iwl_mvm_mac_stop+0x113/0x120 [iwlmvm] [iwlmvm]
A kernel problem occurred, but your kernel has been tainted (flags:GW). Explanation:
W - Taint on warning.
Kernel maintainers are unable to diagnose tainted reports.
WARNING: CPU: 1 PID: 89 at drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:1274 __iwl_mvm_mac_stop+0x113/0x120 [iwlmvm] [iwlmvm]

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