You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to Storybook 7.6, the following error occurs originating from @storybook/addon-actions/dist/index.js during webpack compilation. This error does not occur in Storybook 7.5.3.
{
moduleIdentifier: '/home/sliang/git-workspaces/apps/node_modules/@storybook/addon-actions/dist/index.js',
moduleName: './node_modules/@storybook/addon-actions/dist/index.js',
loc: '8:415-422',
message: 'Critical dependency: require function is used in a way in which dependencies cannot be statically extracted',
moduleId: './node_modules/@storybook/addon-actions/dist/index.js',
moduleTrace: [ [Object], [Object], [Object], [Object] ]
}
After further inspection, this error appears to stem from the same code that calls __require in @storybook/addon-actions/dist/index.js and appears to be the same root cause from a previous bug report #21316 . I can see the following code in @storybook/addon-actions/dist/index.js:
var __require = (x => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, {get: (a, b) => (typeof require < "u" ? require : a)[b]}) : x)(function (x) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x + '" is not supported')
});
__require appears to be used for importing @storybook/global and @storybook/core-events and these were introduced in the "warn on implicit actions" feature that was added in Storybook 7.6.
Rolling back to 7.5.3 appears to fix this issue. Additionally, Storybook version 7.6.0-alpha.6 also compiles correctly as it does not appear to have the aforementioned commit.
Describe the bug
After upgrading to Storybook 7.6, the following error occurs originating from
@storybook/addon-actions/dist/index.js
during webpack compilation. This error does not occur in Storybook 7.5.3.After further inspection, this error appears to stem from the same code that calls
__require
in@storybook/addon-actions/dist/index.js
and appears to be the same root cause from a previous bug report #21316 . I can see the following code in@storybook/addon-actions/dist/index.js
:__require
appears to be used for importing@storybook/global
and@storybook/core-events
and these were introduced in the "warn on implicit actions" feature that was added in Storybook 7.6.Rolling back to 7.5.3 appears to fix this issue. Additionally, Storybook version
7.6.0-alpha.6
also compiles correctly as it does not appear to have the aforementioned commit.To Reproduce
No response
System
The text was updated successfully, but these errors were encountered: