nuxt / content

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

tsconfig.server.json "#mdc-imports" uses a "./file:/home/..." path #2430

Closed MichaelJCole closed 1 month ago

MichaelJCole commented 1 year ago

Environment

Hi, I'm having an issue similar to this: https://github.com/storybook-vue/storybook-nuxt/issues/70

[nitro 12:27:06 PM]  ERROR  Error: Could not load file:///home/michael/causing-us/friend-server/.quasar/electron/baseLayer/.nuxt/mdc-imports.mjs (imported by node_modules/@nuxtjs/mdc/dist/runtime/parser/index.mjs): ENOENT: no such file or directory, open 'file:///home/michael/causing-us/friend-server/.quasar/electron/baseLayer/.nuxt/mdc-imports.mjs'

undefined

[nuxt] build:done: 1.920s
Error occurred in handler for 'api:generateSite': [Error: Could not load file:///home/michael/causing-us/friend-server/.quasar/electron/baseLayer/.nuxt/mdc-imports.mjs (imported by node_modules/@nuxtjs/mdc/dist/runtime/parser/index.mjs): ENOENT: no such file or directory, open 'file:///home/michael/causing-us/friend-server/.quasar/electron/baseLayer/.nuxt/mdc-imports.mjs'] {

I'm not using Storybook, but I have this exact same issue with a Nuxt 3 programmatic build.

The difference seems to be tsconfig.server.json.

Reproduction

I have a working version (my attempted reproduction) and a non-working version (my app). Both builds work without the content module.

Describe the bug

The difference seems to be tsconfig.server.json.

tsconfig.server.json - not working

      "#mdc-imports": [
        "./file:/home/michael/causing-us/friend-server/.quasar/electron/baseLayer/.nuxt/mdc-imports"
      ],

tsconfig.server.json - working

      "#mdc-imports": [
        "./mdc-imports"
      ],

I'm new to Nuxt and not sure how to debug this. Why does it use a file: protocol?

Additional context

No response

Logs

No response

github-actions[bot] commented 2 months 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 1 month ago

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