Failed to fetch dynamically imported module: GlobalScrollAreaStyles, OverlayScrollbars, WithTooltip
See original GitHub issueI’m trying to upgrade Storybook to the latest version 6.2.8
Had multiple issues upgrading through yarn upgrade so the final solution was to remove all old packages and run npx -p @storybook/cli@ sb init. We discarded our old configuration (Storybook hasn’t been modified too much prior to this upgrade) and now we’re using the default config which came with the install, just used custom logic to load all of the stories still relying on the storiesOf api.
main.js
const path = require("path")
const toPath = (_path) => path.join(process.cwd(), _path)
module.exports = {
"stories": [
"./load-stories.js",
],
"addons": [
"@storybook/addon-links",
{
name: '@storybook/addon-essentials',
options: {
docs: false,
}
}
],
// https://github.com/storybookjs/storybook/issues/13277
webpackFinal: async (config) => {
return {
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
"@emotion/styled": toPath("node_modules/@emotion/styled"),
"@emotion/provider": toPath("node_modules/@emotion/provider"),
"@emotion/core": toPath("node_modules/@emotion/react"),
"emotion-theming": toPath("node_modules/@emotion/react"),
"babel-plugin-emotion": toPath("node_modules/@emotion/babel-plugin"),
}
}
};
}
}
The issue is that in 2 out of 3 runs, Storybook ui will throw an error in the browser:

The error persists until I reinstall the storybook packages. The first run goes well, then if I restart the server it usually fails with the aforementioned error.
“@babel/core”: “^7.13.15”, @storybook/addon-actions: ^6.2.8 => 6.2.8 @storybook/addon-essentials: ^6.2.8 => 6.2.8 @storybook/addon-links: ^6.2.8 => 6.2.8 @storybook/react: ^6.2.8 => 6.2.8 “react”: “^16.9.0” => 16.9.0 “react-dom”: “^16.9.0” => 16.9.0 “typescript”: “^3.5.3” => 3.8.3 “webpack”: “^4.17.1” => 4.46.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:13 (1 by maintainers)

Top Related StackOverflow Question
@zakkor I was able to work around this by
acornresolutionrm -rf node_modules && yarnacornresolution againyarn installWhile this is definitely not a future-proof way to handle this, it allows you to at least run storybook in the meantime.
Edit: This seems to work only in some cases though. Meh.
I am currently experiencing this issue. Switching to webpack5 comes with a whole lot of extra baggage with the pollyfill situation with
streamand other node packages.What is the trigger for this? I pulled one of my packages out of a mono repo and this started to become an issue. Is it a specific version of Storybook?