storybook icon indicating copy to clipboard operation
storybook copied to clipboard

Failed to fetch dynamically imported module: sb-vite/deps/@storybook_vue3_dist_entry-preview__mjs.js

Open CraigDaveyHornby opened this issue 1 year ago • 9 comments

I am currently getting the following error when starting up storybook and viewing the local url. I can also see that the same sort of error is present on your examples.

Versions

Package Version
@nuxtjs/storybook ^8.1.4
@storybook-vue/nuxt ^8.1.4
@storybook/addon-a11y ^8.2.4
@storybook/addon-actions ^8.2.4
@storybook/addon-essentials ^8.2.4
@storybook/addon-interactions ^8.2.4
@storybook/addon-links ^8.2.4
@storybook/addon-viewport ^8.2.4
@storybook/blocks ^8.2.4
@storybook/builder-vite ^8.2.4
@storybook/test ^8.2.4

Error

Failed to fetch dynamically imported module: http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/@storybook_vue3_dist_entry-preview__mjs.js?v=9916e1e6

CraigDaveyHornby avatar Jul 25 '24 15:07 CraigDaveyHornby

Same problem, couldn't solve it?

N3P0m avatar Jul 26 '24 16:07 N3P0m

Same problem

"nuxt": "3.12.4",
"vue": "3.4.34",
"@nuxtjs/storybook": "8.1.5",
"@storybook-vue/nuxt": "8.1.5",
"@storybook/addon-essentials": "8.2.6",
"@storybook/addon-interactions": "8.2.6",
"@storybook/addon-links": "8.2.6",
"@storybook/addon-viewport": "8.2.6",
"@storybook/blocks": "8.2.6",
"@storybook/builder-vite": "8.2.6",
"@storybook/test": "8.2.6",
"@storybook/types": "8.2.6",
"@storybook/vue3": "8.2.6",
"storybook": "8.2.6",

evgentus-cy avatar Jul 29 '24 10:07 evgentus-cy

Errors in terminal

Error: Build failed with 3 errors:
node_modules/@storybook-vue/nuxt/dist/preview.mjs:5:30: ERROR: Could not resolve "virtual:nuxt-runtime-config"
node_modules/@storybook-vue/nuxt/dist/preview.mjs:6:7: ERROR: Could not resolve "#build/css"
node_modules/@storybook-vue/nuxt/dist/preview.mjs:7:20: ERROR: Could not resolve "#build/plugins"

Versions of @nuxt/vite-builder in yarn.lock are @nuxt/[email protected]", "@nuxt/vite-builder@^3.12.2

evgentus-cy avatar Jul 30 '24 07:07 evgentus-cy

I think this is a copy of https://github.com/nuxt-modules/storybook/issues/718
Fix in progress https://github.com/nuxt-modules/storybook/pull/726

evgentus-cy avatar Jul 30 '24 08:07 evgentus-cy

I also got it sometimes, but it disappeared when refreshing the browser. Maybe an issue with vite's dependency optimization.

tobiasdiez avatar Aug 03 '24 10:08 tobiasdiez

Hi, do you have an ETA for the release of this fix ? Thanks for the fix

Tyki avatar Aug 06 '24 09:08 Tyki

I have the same problem

"nuxt": "3.12.4",
"vue": "3.4.35",
"@nuxtjs/storybook": "8.1.5",
"@storybook-vue/nuxt": "8.1.5",
"@storybook/addon-essentials": "8.2.7",
"@storybook/addon-interactions": "8.2.7",
"@storybook/addon-links": "8.2.7",
"@storybook/addon-viewport": "8.2.7",
"@storybook/blocks": "8.2.7",
"@storybook/builder-vite": "8.2.7",
"@storybook/test": "8.2.7",
"@storybook/types": "8.2.7",
"@storybook/vue3": "8.2.7",
"storybook": "8.2.7",

I got this error too:

ERROR  (node:23907) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use node --trace-warnings ... to show where the warning was created)

 ERROR  (node:23907) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time 

ouladck avatar Aug 06 '24 13:08 ouladck

This might be related to the upstream bug: https://github.com/storybookjs/storybook/issues/28620

tobiasdiez avatar Aug 20 '24 14:08 tobiasdiez

Could someone please provide a minimal reproduction? For me this is no longer occurring in the latest versions.

tobiasdiez avatar Aug 28 '24 10:08 tobiasdiez