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
Unhandled promise rejection: ReferenceError: module is not defined
at file:/..node_modules/@storybook-vue/nuxt/preset.js:1:1
Workaround replace module.exports with export in preset.js in .node_modules/@storybook-vue/nuxt/preset.js
// module.exports = require('./dist/preset.cjs')
export * from './dist/preset.mjs';
Also, preset.js should not be used at all, there is just /preset does the proper mapping
Additional context
SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: @storybook-vue\nuxt\preset.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
ReferenceError: module is not defined
at file:///C:/,,,/node_modules/@storybook-vue/nuxt/preset.js:1:1
at ModuleJobSync.runSync (node:internal/modules/esm/module_job:395:35)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:329:47)
at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)
at Module._compile (node:internal/modules/cjs/loader:1547:5)
at node:internal/modules/cjs/loader:1677:16
at Object.newLoader (.\node_modules\esbuild-register\dist\node.js:2262:9)
at extensions..js (.\node_modules\esbuild-register\dist\node.js:4833:24)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
More info:
at loadPreset (.\node_modules\@storybook\core\dist\common\index.cjs:16477:13)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
Unhandled promise rejection: ReferenceError: module is not defined
The text was updated successfully, but these errors were encountered:
Environment
Reproduction
https://new-storybook.netlify.app/
Describe the bug
With node 22 I get
Workaround replace
module.exports
withexport
inpreset.js
in.node_modules/@storybook-vue/nuxt/preset.js
Also,
preset.js
should not be used at all, there is just/preset
does the proper mappingAdditional context
The text was updated successfully, but these errors were encountered: