nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.06k stars 622 forks source link

nuxt storybook and nuxt content dont play nice #2504

Closed jpengelbrecht closed 2 weeks ago

jpengelbrecht commented 7 months ago

Environment


Reproduction

https://github.com/jpengelbrecht/nuxt-seo-route-rules-issue/tree/nuxt-content-and-story-book-cant-play-nice

Describe the bug

image

installing both modules: [ "@nuxt/content", "@nuxtjs/storybook", ],

will break npm run dev and result in the above error. it also breaksnpm run storybook find reprodction here. https://github.com/jpengelbrecht/nuxt-seo-route-rules-issue/tree/nuxt-content-and-story-book-cant-play-nice

Additional context

No response [nitro] ✔ Generated public .output/public [nitro] ℹ Building Nitro Server (preset: node-server) (alias plugin) rewrote #mdc-imports to file:///Users/jean-pierre/Projects/site-main/.nuxt/mdc-imports.mjs but was not an abolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path. (alias plugin) rewrote #mdc-imports to file:///Users/jean-pierre/Projects/site-main/.nuxt/mdc-imports.mjs but was not an abolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path.

[nitro] ERROR Error: Could not load file:///Users/jean-pierre/Projects/site-main/.nuxt/mdc-imports.mjs (imported by node_modules/@nuxtjs/mdc/dist/runtime/parser/index.mjs): ENOENT: no such file or directory, open 'file:///Users/jean-pierre/Projects/site-main/.nuxt/mdc-imports.mjs'

undefined

=> Failed to build the preview Error: Error: Could not load file://./.nuxt/mdc-imports.mjs (imported by node_modules/@nuxtjs/mdc/dist/runtime/parser/index.mjs): ENOENT: no such file or directory, open 'file://./.nuxt/mdc-imports.mjs' at defineNuxtConfig (./nodemodules/.pnpm/@storybook-vue+nuxt@0.2.0@types+node@20.11.3_@vue+compiler-core@3.4.14_eslint@8.56.0_nuxt@3._ozvbtwmhvmux5ilcf4zf4co6ja/node_modules/@storybook-vue/nuxt/dist/preset.cjs:6594:11) at async Object.viteFinal (./nodemodules/.pnpm/@storybook-vue+nuxt@0.2.0@types+node@20.11.3_@vue+compiler-core@3.4.14_eslint@8.56.0_nuxt@3._ozvbtwmhvmux5ilcf4zf4co6ja/node_modules/@storybook-vue/nuxt/dist/preset.cjs:6615:22) at async createViteServer (./node_modules/.pnpm/@storybook+builder-vite@7.5.3_typescript@5.3.3_vite@5.0.11/node_modules/@storybook/builder-vite/dist/index.js:159:10518) at async Module.start (./node_modules/.pnpm/@storybook+builder-vite@7.5.3_typescript@5.3.3_vite@5.0.11/node_modules/@storybook/builder-vite/dist/index.js:159:12520) at async storybookDevServer (./node_modules/.pnpm/@storybook+core-server@7.5.3/node_modules/@storybook/core-server/dist/index.js:104:2460) at async buildDevStandalone (./node_modules/.pnpm/@storybook+core-server@7.5.3/node_modules/@storybook/core-server/dist/index.js:119:3007) at async withTelemetry (./node_modules/.pnpm/@storybook+core-server@7.5.3/node_modules/@storybook/core-server/dist/index.js:103:3903) at async dev (./node_modules/.pnpm/@storybook+cli@7.5.3/node_modules/@storybook/cli/dist/generate.js:473:401) at async Command. (./node_modules/.pnpm/@storybook+cli@7.5.3/node_modules/@storybook/cli/dist/generate.js:475:225)

WARN Broken build, fix the error above. WARN You may need to refresh the browser.

No response

bahulneel commented 6 months ago

I solved this by installing @nuxt/mdc@latest.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been stalled for 30 days with no activity.