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

Storybook fails to build/start on v6.5.9, works on v6.4.20 #18632

Closed
smparekh opened this issue Jul 5, 2022 · 3 comments
Closed

Storybook fails to build/start on v6.5.9, works on v6.4.20 #18632

smparekh opened this issue Jul 5, 2022 · 3 comments

Comments

@smparekh
Copy link

smparekh commented Jul 5, 2022

Describe the bug
Working config with v6.4.20 fails to start when upgrading to latest stable

System

Environment Info:

  System:
    OS: macOS 12.4
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 18.4.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.12.1 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 103.0.5060.53
    Firefox: 102.0
    Safari: 15.5
  npmPackages:
    @storybook/addon-actions: 6.5.9 => 6.5.9
    @storybook/addon-essentials: 6.5.9 => 6.5.9
    @storybook/addon-interactions: 6.5.9 => 6.5.9
    @storybook/addon-links: 6.5.9 => 6.5.9
    @storybook/builder-webpack5: 6.5.9 => 6.5.9
    @storybook/manager-webpack5: 6.5.9 => 6.5.9
    @storybook/react: 6.5.9 => 6.5.9
    @storybook/testing-library: ^0.0.13 => 0.0.13
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");

module.exports = {
  stories: [
    "../src/stories/*.stories.mdx",
    "../src/stories/*.stories.@(js|jsx|ts|tsx)",
  ],
  addons: [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/addon-interactions",
  ],
  framework: "@storybook/react",
  core: {
    builder: {
      name: "webpack5",
    },
  },
  webpackFinal: async (config, { configType }) => {
    config.resolve.plugins = [new TsconfigPathsPlugin()];
    return config;
  },
};
import "antd/dist/antd.css";
import "../public/light-theme.css";

export const parameters = {
  actions: { argTypesRegex: "^on[A-Z].*" },
  controls: {
    matchers: {
      color: /(background|color)$/i,
      date: /Date$/,
    },
  },
}

Additional context
Error Log:

yarn run v1.22.19
$ start-storybook -p 6006
info @storybook/react v6.5.9
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 => Ignoring cached manager due to change in manager config
<i> [webpack-dev-middleware] wait until bundle finished
21% building 3/15 entries 7095/7159 dependencies 700/2427 modulesassets by chunk 5.96 MiB (id hint: vendors)
  assets by status 5.54 MiB [big]
    asset vendors-node_modules_storybook_addon-actions_manager_js-node_modules_storybook_addon-backgrou-076004.manager.bundle.js 4.38 MiB [emitted] [big] (id hint: vendors)
    asset vendors-node_modules_storybook_components_dist_esm_formatter-9dc562d4_js.manager.bundle.js 886 KiB [emitted] [big] (id hint: vendors)
    asset vendors-node_modules_storybook_components_dist_esm_OverlayScrollbars-26c4a78d_js.manager.bundle.js 295 KiB [emitted] [big] (id hint: vendors)
  asset vendors-node_modules_storybook_components_dist_esm_syntaxhighlighter-82dea71a_js.manager.bundle.js 205 KiB [emitted] (id hint: vendors)
  asset vendors-node_modules_storybook_components_dist_esm_WithTooltip-508b8277_js.manager.bundle.js 126 KiB [emitted] (id hint: vendors)
  asset vendors-node_modules_storybook_components_dist_esm_Color-3c22bb81_js.manager.bundle.js 82.8 KiB [emitted] (id hint: vendors)
  asset vendors-node_modules_storybook_components_dist_esm_GlobalScrollAreaStyles-8793ce4a_js.manager.bundle.js 15.5 KiB [emitted] (id hint: vendors)
asset runtime~main.manager.bundle.js 14.2 KiB [emitted] (name: runtime~main)
asset index.html 4.09 KiB [emitted]
asset main.manager.bundle.js 1.51 KiB [emitted] (name: main)
asset node_modules_unfetch_dist_unfetch_js.manager.bundle.js 1.28 KiB [emitted]
Entrypoint main [big] 4.4 MiB = runtime~main.manager.bundle.js 14.2 KiB vendors-node_modules_storybook_addon-actions_manager_js-node_modules_storybook_addon-backgrou-076004.manager.bundle.js 4.38 MiB main.manager.bundle.js 1.51 KiB
orphan modules 994 KiB [orphan] 147 modules
runtime modules 8.72 KiB 15 modules
javascript modules 5.28 MiB 914 modules
json modules 1.52 KiB
  ./node_modules/character-entities-legacy/index.json 1.24 KiB [built] [code generated]
  ./node_modules/character-reference-invalid/index.json 289 bytes [built] [code generated]
manager (webpack 5.73.0) compiled successfully in 4832 ms
99% done plugins webpack-hot-middlewarewebpack built preview 35e4d3f8008d803473a1 in 9338ms
WARN Force closed manager build
ModuleNotFoundError: Module not found: Error: Can't resolve '/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config' in '/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs'
    at /Users/shai/workspace/app/node_modules/webpack/lib/Compilation.js:2016:28
    at /Users/shai/workspace/app/node_modules/webpack/lib/NormalModuleFactory.js:798:13
    at eval (eval at create (/Users/shai/workspace/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /Users/shai/workspace/app/node_modules/webpack/lib/NormalModuleFactory.js:270:22
    at eval (eval at create (/Users/shai/workspace/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /Users/shai/workspace/app/node_modules/webpack/lib/NormalModuleFactory.js:434:22
    at /Users/shai/workspace/app/node_modules/webpack/lib/NormalModuleFactory.js:116:11
    at /Users/shai/workspace/app/node_modules/webpack/lib/NormalModuleFactory.js:670:25
    at /Users/shai/workspace/app/node_modules/webpack/lib/NormalModuleFactory.js:855:8
    at /Users/shai/workspace/app/node_modules/webpack/lib/NormalModuleFactory.js:975:5
resolve '/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config' in '/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs'
  using description file: /Users/shai/workspace/app/node_modules/@storybook/react/package.json (relative path: ./dist/esm/client/docs)
    Field 'browser' doesn't contain a valid alias configuration
    root path /Users/shai/workspace/app
      using description file: /Users/shai/workspace/app/package.json (relative path: ./Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config)
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config doesn't exist
        .mjs
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.mjs doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.js doesn't exist
        .jsx
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.jsx doesn't exist
        .ts
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.ts doesn't exist
        .tsx
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.tsx doesn't exist
        .json
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.json doesn't exist
        .cjs
          Field 'browser' doesn't contain a valid alias configuration
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.cjs doesn't exist
        as directory
          /Users/shai/workspace/app/Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config doesn't exist
    using description file: /Users/shai/workspace/app/node_modules/@storybook/react/package.json (relative path: ./dist/esm/client/docs/config)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config doesn't exist
      .mjs
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.mjs doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.js doesn't exist
      .jsx
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.jsx doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.ts doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.tsx doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.json doesn't exist
      .cjs
        Field 'browser' doesn't contain a valid alias configuration
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config.cjs doesn't exist
      as directory
        /Users/shai/workspace/app/node_modules/@storybook/react/dist/esm/client/docs/config doesn't exist

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
@smparekh
Copy link
Author

hello, anything I can help to recreate / debug this issue?

@donotlb
Copy link
Contributor

donotlb commented Jul 12, 2022

relates to #18278 ?

@smparekh
Copy link
Author

that was it, thank you!

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

No branches or pull requests

2 participants