storybook
storybook copied to clipboard
[Bug]: webpack-dev-middleware Error: ENOENT: no such file or directory on Windows
Describe the bug
When path to stories.ts file is too long, storybook failed with error:
<e> [webpack-dev-middleware] [Error: ENOENT: no such file or directory, open 'C:\Users\Mihail.Goloborodov\Downloads\github-vt6qqm\node_modules\.cache\storybook\1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86\public\stories-very-very-very-very-very- very-long-directory-name-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very-long-file- name-stories.iframe.bundle.js'] { <e> errno: -4058, <e> code: 'ENOENT', <e> syscall: 'open', <e> path: 'C:\\Users\\Mihail.Goloborodov\\Downloads\\github-vt6qqm\\node_modules\\.cache\\storybook\\1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86\\public\\stories-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very- long-directory-name-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very-long-directory-name-very-very-very-very-very-very-long-file-name-stories.iframe.bundle.js' <e> }
I think there is a problem with filenames longer then 256 symbols on Windows.
Reproduction link
https://stackblitz.com/edit/github-vt6qqm
Reproduction steps
- Go to the link above
- Download project and run on windows:
npm i
andnpm run storybook
(oryarn
andyarn storybook
) - Error in terminal
System
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Binaries:
Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD <----- active
Browsers:
Chrome: 126.0.6478.114
Edge: Chromium (126.0.2592.68)
npmPackages:
@storybook/addon-docs: ^8.2.0-alpha.10 => 8.2.0-alpha.10
@storybook/addon-essentials: ^8.2.0-alpha.10 => 8.2.0-alpha.10
@storybook/addon-interactions: ^8.2.0-alpha.10 => 8.2.0-alpha.10
@storybook/addon-links: ^8.2.0-alpha.10 => 8.2.0-alpha.10
@storybook/angular: ^8.2.0-alpha.10 => 8.2.0-alpha.10
@storybook/blocks: ^8.2.0-alpha.10 => 8.2.0-alpha.10
@storybook/test: ^8.2.0-alpha.10 => 8.2.0-alpha.10
storybook: ^8.2.0-alpha.10 => 8.2.0-alpha.10
Additional context
No response