Describe the bug
Storybook v6 fails to start on Windows system as well as inside Windows WSL (Ubuntu 16/18).
To Reproduce
Steps to reproduce the behavior:
"storybook": "start-storybook -p 6006",$ start-storybook -p 6006
info @storybook/react v6.0.0-alpha.15
info
info => Loading presets
info => Loading presets
info => Loading config/preview file in "./.storybook".
info => Adding stories defined in ".storybook\main.js".
info => Loading custom Webpack config (full-control mode).
info => Using base config because react-scripts is not installed.
70% building 15/15 modules 0 active× 「wdm」: ModuleNotFoundError: Module not found: Error: Can't resolve 'D:Reposgaming-shell.storybookpreview.js' in 'D:\Repos\gaming
-shell\.storybook'
at D:\Repos\gaming-shell\node_modules\webpack\lib\Compilation.js:925:10
at D:\Repos\gaming-shell\node_modules\webpack\lib\NormalModuleFactory.js:401:22
at D:\Repos\gaming-shell\node_modules\webpack\lib\NormalModuleFactory.js:130:21
at D:\Repos\gaming-shell\node_modules\webpack\lib\NormalModuleFactory.js:224:22
at D:\Repos\gaming-shell\node_modules\neo-async\async.js:2830:7
at D:\Repos\gaming-shell\node_modules\neo-async\async.js:6877:13
at D:\Repos\gaming-shell\node_modules\webpack\lib\NormalModuleFactory.js:214:25
at D:\Repos\gaming-shell\node_modules\enhanced-resolve\lib\Resolver.js:213:14
at D:\Repos\gaming-shell\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (D:\Repos\gaming-shell\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:13:1)
at D:\Repos\gaming-shell\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:44:7
at D:\Repos\gaming-shell\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (D:\Repos\gaming-shell\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:13:1)
at D:\Repos\gaming-shell\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (D:\Repos\gaming-shell\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:25:1)
at D:\Repos\gaming-shell\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:67:43
× 「wdm」: resolve 'D:Reposgaming-shell.storybookpreview.js' in 'D:\Repos\gaming-shell\.storybook'
Parsed request is a module
using description file: D:\Repos\gaming-shell\package.json (relative path: ./.storybook)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
D:\Repos\gaming-shell\.storybook\node_modules doesn't exist or is not a directory
D:\node_modules doesn't exist or is not a directory
looking for modules in D:\Repos\gaming-shell\node_modules
using description file: D:\Repos\gaming-shell\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in D:\Repos\node_modules
using description file: D:\Repos\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
using description file: D:\Repos\gaming-shell\package.json (relative path: ./node_modules/D:Reposgaming-shell.storybookpreview.js)
no extension
Field 'browser' doesn't contain a valid alias configuration
using description file: D:\Repos\package.json (relative path: ./node_modules/D:Reposgaming-shell.storybookpreview.js)
no extension
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js.jsx doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js.jsx doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js.json doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js.json doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js.tsx doesn't exist
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js.tsx doesn't exist
as directory
D:\Repos\gaming-shell\node_modules\D:Reposgaming-shell.storybookpreview.js doesn't exist
as directory
D:\Repos\node_modules\D:Reposgaming-shell.storybookpreview.js doesn't exist
Expected behavior
Storybook should start correctly.
Screenshots

System:
Environment Info:
System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Binaries:
Node: 13.9.0 - C:Program Filesnodejsnode.EXE
Yarn: 1.22.0 - C:Program Files (x86)Yarnbinyarn.CMD
npm: 6.13.4 - D:Reposgaming-shellnode_modules.binnpm.CMD
Browsers:
Edge: 44.18362.449.0
Additional context
Some code in storybook or some dependency of storybook is using path with backslashes to find files on disk while it's working well on MacOs and Linux it fails on Windows.
There is another problem on Windows with the latest version of the next branch. I do not know if these problems are related.
Everything goes well when launching the command yarn bootstrap --core, but when I try to launch one of the storybooks in the examples directory with the command yarn storybook, there is an error:
[./generated-stories-entry.js] 670 bytes {main} [built]
[./preview.js-generated-config-entry.js] 485 bytes {main} [built]
[./storybook-init-framework-entry.js] 26 bytes {main} [built]
+ 1840 hidden modules
ERROR in D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js
Module not found: Error: Can't resolve 'D:devhomeprojets-tiersstorybookaddonsa11ydistpresetaddDecorator.js' in 'D:\devhome\projets-tiers\storybook\addons\a11y\dist\preset'
@ D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js 4:43-128
@ multi D:/devhome/projets-tiers/storybook/lib/core/dist/server/common/polyfills.js D:/devhome/projets-tiers/storybook/lib/core/dist/server/preview/globals.js ./storybook-init-framework-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js ./preview.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js ./generated-stories-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=false
ERROR in D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js
eactconfig.js' in 'D:\devhome\projets-tiers\storybook\addons\docs\dist\frameworks\react'meworks
@ D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js 4:43-132
@ multi D:/devhome/projets-tiers/storybook/lib/core/dist/server/common/polyfills.js D:/devhome/projets-tiers/storybook/lib/core/dist/server/preview/globals.js ./storybook-init-framework-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js ./preview.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js ./generated-stories-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=false
ERROR in D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js
Module not found: Error: Can't resolve 'D:devhomeprojets-tiersstorybookaddonsdocsdist♀rameworkscommonconfig.js' in 'D:\devhome\projets-tiers\storybook\addons\docs\dist\frameworks\common'
@ D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js 4:43-133
@ multi D:/devhome/projets-tiers/storybook/lib/core/dist/server/common/polyfills.js D:/devhome/projets-tiers/storybook/lib/core/dist/server/preview/globals.js ./storybook-init-framework-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js ./preview.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js ./generated-stories-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=false
ERROR in D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js
Module not found: Error: Can't resolve 'D:devhomeprojets-tiersstorybookaddonsknobsdistpresetaddDecorator.js' in 'D:\devhome\projets-tiers\storybook\addons\knobs\dist\preset'
@ D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js 4:43-129
@ multi D:/devhome/projets-tiers/storybook/lib/core/dist/server/common/polyfills.js D:/devhome/projets-tiers/storybook/lib/core/dist/server/preview/globals.js ./storybook-init-framework-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js ./preview.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js ./generated-stories-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=false
ERROR in D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js
Module not found: Error: Can't resolve 'D:devhomeprojets-tiersstorybookaddonslinksdistpresetaddDecorator.js' in 'D:\devhome\projets-tiers\storybook\addons\links\dist\preset'
@ D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js 4:43-129
@ multi D:/devhome/projets-tiers/storybook/lib/core/dist/server/common/polyfills.js D:/devhome/projets-tiers/storybook/lib/core/dist/server/preview/globals.js ./storybook-init-framework-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js ./preview.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js ./generated-stories-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=false
ERROR in ./preview.js-generated-config-entry.js
Module not found: Error: Can't resolve 'D:devhomeprojets-tiersstorybookexamplesofficial-storybookpreview.js' in 'D:\devhome\projets-tiers\storybook\examples\official-storybook'
@ ./preview.js-generated-config-entry.js 5:15-99
@ multi D:/devhome/projets-tiers/storybook/lib/core/dist/server/common/polyfills.js D:/devhome/projets-tiers/storybook/lib/core/dist/server/preview/globals.js ./storybook-init-framework-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/common/config.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/docs/dist/frameworks/react/config.js-generated-config-entry.js ./preview.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/links/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/knobs/dist/preset/addDecorator.js-generated-config-entry.js D:/devhome/projets-tiers/storybook/addons/a11y/dist/preset/addDecorator.js-generated-config-entry.js ./generated-stories-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=false
Child HtmlWebpackCompiler:
Asset Size Chunks Chunk Names
__child-HtmlWebpackPlugin_0 6.55 KiB HtmlWebpackPlugin_0 HtmlWebpackPlugin_0
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
[../../node_modules/html-webpack-plugin/lib/loader.js!../../lib/core/dist/server/templates/index.ejs] D:/devhome/projets-tiers/storybook/node_modules/html-webpack-plugin/lib/loader.js!D:/devhome/projets-tiers/storybook/lib/core/dist/server/templates/index.ejs 2.23 KiB {HtmlWebpackPlugin_0} [built]
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
This error was not present in the previous alpha.
It seems related to the changes made in PR #9877
^ Looks for me like the same issue.
Crikey!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.20 containing PR #9960 that references this issue. Upgrade today to try it out!
You can find this prerelease on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
Most helpful comment
Crikey!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.20 containing PR #9960 that references this issue. Upgrade today to try it out!
You can find this prerelease on the
@nextNPM tag.Closing this issue. Please re-open if you think there's still more to do.