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

[Bug]: webpack-dev-middleware Error: ENOENT: no such file or directory on Windows #28344

Open
msgoloborodov opened this issue Jun 25, 2024 · 0 comments

Comments

@msgoloborodov
Copy link

msgoloborodov commented Jun 25, 2024

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

  1. Go to the link above
  2. Download project and run on windows: npm i and npm run storybook (or yarn and yarn storybook)
  3. 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

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

1 participant