Skip to content

[Bug] Fails to compile #18

@micheljung

Description

@micheljung

Describe the bug

The Storybookjs Stackblitz doesn't compile.

Steps to reproduce the behavior

  1. Go to https://stackblitz.com/github/storybookjs/sandboxes/tree/next/angular-cli/default-ts/after-storybook?file=README.md&preset=node
  2. Watch the Console and wait
  3. See error

Expected behavior

Don't fail.

Screenshots and/or logs

ERROR in ./.storybook/preview.ts
Module build failed (from ./node_modules/@storybook/builder-webpack5/dist/loaders/storybook-mock-transform-loader.js):
TypeError: Failed to fetch dynamically imported module: file:///home/projects/owailakbml.github/node_modules/@storybook/builder-webpack5/dist/loaders/storybook-mock-transform-loader.js
 @ ./storybook-config-entry.js 8:425-490 39:2-44:4 39:451-44:3

ERROR in ./node_modules/@storybook/addon-a11y/dist/preview.js
Module build failed (from ./node_modules/@storybook/builder-webpack5/dist/loaders/storybook-mock-transform-loader.js):
TypeError: Failed to fetch dynamically imported module: file:///home/projects/owailakbml.github/node_modules/@storybook/builder-webpack5/dist/loaders/storybook-mock-transform-loader.js
 @ ./storybook-config-entry.js 8:233-327 39:2-44:4 39:451-44:3

ERROR in ./node_modules/@storybook/addon-docs/dist/preview.js
Module build failed (from ./node_modules/@storybook/builder-webpack5/dist/loaders/storybook-mock-transform-loader.js):
TypeError: Failed to fetch dynamically imported module: file:///home/projects/owailakbml.github/node_modules/@storybook/builder-webpack5/dist/loaders/storybook-mock-transform-loader.js
 @ ./storybook-config-entry.js 8:329-423 39:2-44:4 39:451-44:3

ERROR in ./src/stories/Configure.mdx
Module build failed (from ./node_modules/@storybook/addon-docs/dist/mdx-loader.js):
TypeError: Failed to fetch dynamically imported module: file:///home/projects/owailakbml.github/node_modules/@storybook/addon-docs/dist/mdx-loader.js
 @ ./src/ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:\/src(?:\/(?%21\.)(?:(?:(?%21(?:^%7C\/)\.).)*?)\/%7C\/%7C$)(?%21\.)(?=.)[^/]*?\.mdx)$ chunkName: [request] namespace object ./stories/Configure.mdx
 @ ./storybook-stories.js 9:11-11:29
 @ ./storybook-config-entry.js 6:0-50 23:31-39 33:2-38:4 36:6-14 33:58-38:3

ERROR in ./src/stories/button.stories.ts
Module build failed (from ./node_modules/@storybook/csf-plugin/dist/webpack-loader.js):
TypeError: Failed to fetch dynamically imported module: file:///home/projects/owailakbml.github/node_modules/@storybook/csf-plugin/dist/webpack-loader.js
 @ ./src/ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:\/src(?:\/(?%21\.)(?:(?:(?%21(?:^%7C\/)\.).)*?)\/%7C\/%7C$)(?%21\.)(?=.)[^/]*?\.stories\.(js%7Cjsx%7Cmjs%7Cts%7Ctsx))$ chunkName: [request] namespace object ./stories/button.stories.ts ./stories/button.stories
 @ ./storybook-stories.js 22:11-24:29
 @ ./storybook-config-entry.js 6:0-50 23:31-39 33:2-38:4 36:6-14 33:58-38:3

ERROR in ./src/stories/header.stories.ts
Module build failed (from ./node_modules/@storybook/csf-plugin/dist/webpack-loader.js):
TypeError: Failed to fetch dynamically imported module: file:///home/projects/owailakbml.github/node_modules/@storybook/csf-plugin/dist/webpack-loader.js
 @ ./src/ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:\/src(?:\/(?%21\.)(?:(?:(?%21(?:^%7C\/)\.).)*?)\/%7C\/%7C$)(?%21\.)(?=.)[^/]*?\.stories\.(js%7Cjsx%7Cmjs%7Cts%7Ctsx))$ chunkName: [request] namespace object ./stories/header.stories.ts ./stories/header.stories
 @ ./storybook-stories.js 22:11-24:29
 @ ./storybook-config-entry.js 6:0-50 23:31-39 33:2-38:4 36:6-14 33:58-38:3

ERROR in ./src/stories/page.stories.ts
Module build failed (from ./node_modules/@storybook/csf-plugin/dist/webpack-loader.js):
TypeError: Failed to fetch dynamically imported module: file:///home/projects/owailakbml.github/node_modules/@storybook/csf-plugin/dist/webpack-loader.js
 @ ./src/ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:\/src(?:\/(?%21\.)(?:(?:(?%21(?:^%7C\/)\.).)*?)\/%7C\/%7C$)(?%21\.)(?=.)[^/]*?\.stories\.(js%7Cjsx%7Cmjs%7Cts%7Ctsx))$ chunkName: [request] namespace object ./stories/page.stories.ts ./stories/page.stories
 @ ./storybook-stories.js 22:11-24:29
 @ ./storybook-config-entry.js 6:0-50 23:31-39 33:2-38:4 36:6-14 33:58-38:3

preview compiled with 7 errors
│
▲  DefinePlugin
│  Conflicting values for 'process.env.NODE_ENV'
│
■  Failed to build the preview

Environment

  • Node.js version: 20.19.1
  • NPM version: 10.8.2

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions