Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Meta empty error #71

Open
sseworld opened this issue Aug 14, 2024 · 1 comment
Open

Component Meta empty error #71

sseworld opened this issue Aug 14, 2024 · 1 comment

Comments

@sseworld
Copy link

I have given the code in here. (click here)

My component meta is empty after preparation. Code of component-meta.mjs :-

export default {}

My component-meta.d.ts code is this :-

import type { ComponentData } from 'nuxt-component-meta'
export type NuxtComponentMetaNames = 'ColorModeButton' | 'ComponentCard' | 'ComponentPreset' | 'ComponentProps' | 'ComponentPropsField' | 'ComponentSlots' | 'Placeholder' | 'AsideExample1' | 'Callout' | 'Card' | 'CardGroup' | 'CodeGroup' | 'Collapsible' | 'Field' | 'FieldGroup' | 'Shortcut' | 'Tabs' | 'ProseCode' | 'ProseCodeButton' | 'ProseCodeIcon' | 'ProseH1' | 'ProseH2' | 'ProseH3' | 'ProseH4' | 'ContentDoc' | 'ContentList' | 'ContentNavigation' | 'ContentQuery' | 'ContentRenderer' | 'ContentRendererMarkdown' | 'ContentSlot' | 'DocumentDrivenEmpty' | 'DocumentDrivenNotFound' | 'Markdown' | 'ProseCodeInline' | 'ProsePre' | 'ProseA' | 'ProseBlockquote' | 'ProseEm' | 'ProseH5' | 'ProseH6' | 'ProseHr' | 'ProseImg' | 'ProseLi' | 'ProseOl' | 'ProseP' | 'ProseScript' | 'ProseStrong' | 'ProseTable' | 'ProseTbody' | 'ProseTd' | 'ProseTh' | 'ProseThead' | 'ProseTr' | 'ProseUl' | 'UButton' | 'UIcon' | 'SseIcon' | 'Icon' | 'ColorModeButton' | 'ComponentCard' | 'ComponentPreset' | 'ComponentProps' | 'ComponentPropsField' | 'ComponentSlots' | 'Placeholder' | 'AsideExample1' | 'Callout' | 'Card' | 'CardGroup' | 'CodeGroup' | 'Collapsible' | 'Field' | 'FieldGroup' | 'Shortcut' | 'Tabs' | 'ProseCode' | 'ProseCodeButton' | 'ProseCodeIcon' | 'ProseH1' | 'ProseH2' | 'ProseH3' | 'ProseH4' | 'ContentDoc' | 'ContentList' | 'ContentNavigation' | 'ContentQuery' | 'ContentRenderer' | 'ContentRendererMarkdown' | 'ContentSlot' | 'DocumentDrivenEmpty' | 'DocumentDrivenNotFound' | 'Markdown' | 'ProseCodeInline' | 'ProsePre' | 'ProseA' | 'ProseBlockquote' | 'ProseEm' | 'ProseH5' | 'ProseH6' | 'ProseHr' | 'ProseImg' | 'ProseLi' | 'ProseOl' | 'ProseP' | 'ProseScript' | 'ProseStrong' | 'ProseTable' | 'ProseTbody' | 'ProseTd' | 'ProseTh' | 'ProseThead' | 'ProseTr' | 'ProseUl' | 'UButton' | 'UIcon' | 'SseIcon' | 'Icon'
export type NuxtComponentMeta = Record<NuxtComponentMetaNames, ComponentData>
declare const components: NuxtComponentMeta
export { components as default, components }

My nuxt.config.ts code is this:-

export default defineNuxtConfig({
  modules: [
    "@nuxt/content",
    "@nuxt/eslint",
    "@nuxt/fonts",
    "@nuxt/image",
    "@nuxt/ui",
    "@nuxthq/studio",
    "nuxt-og-image",
    "nuxt-component-meta"
  ],
})

It is showing this error while running

[5:10:08 PM]  ERROR  Cannot start nuxt:  Cannot find module 'D:/next/sse-nuxt-ui/docs/node_modules/nuxt/dist/app/components/welcome'
Require stack:
- D:\next\sse-nuxt-ui\docs\index.js

  Require stack:
  - index.js
  at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15)
  at Function.resolve (node:internal/modules/helpers:133:19)  
  at Function._resolve [as resolve] (node_modules\jiti\dist\jiti.js:1:241814)
  at resolveModule (/D:/next/sse-nuxt-ui/docs/node_modules/@nuxt/kit/dist/index.mjs:2224:29)
  at /D:/next/sse-nuxt-ui/docs/node_modules/nuxt-component-meta/dist/parser.mjs:44:26
  at Array.reduce (<anonymous>)
  at useComponentMetaParser (/D:/next/sse-nuxt-ui/docs/node_modules/nuxt-component-meta/dist/parser.mjs:36:28)
  at /D:/next/sse-nuxt-ui/docs/node_modules/nuxt-component-meta/dist/module.mjs:182:16
  at async /D:/next/sse-nuxt-ui/docs/node_modules/nuxt/dist/index.mjs:2345:7
  at async generateApp (/D:/next/sse-nuxt-ui/docs/node_modules/nuxt/dist/index.mjs:5182:3)
  at async _applyPromised (/D:/next/sse-nuxt-ui/docs/node_modules/perfect-debounce/dist/index.mjs:54:10)


[5:10:08 PM]  ERROR  [unhandledRejection] Cannot find module 'D:/next/sse-nuxt-ui/docs/node_modules/nuxt/dist/app/components/welcome'
Require stack:
- D:\next\sse-nuxt-ui\docs\index.js

  Require stack:
  - index.js
  at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15)
  at Function.resolve (node:internal/modules/helpers:133:19)  
  at Function._resolve [as resolve] (node_modules\jiti\dist\jiti.js:1:241814)
  at resolveModule (/D:/next/sse-nuxt-ui/docs/node_modules/@nuxt/kit/dist/index.mjs:2224:29)
  at /D:/next/sse-nuxt-ui/docs/node_modules/nuxt-component-meta/dist/parser.mjs:44:26
  at Array.reduce (<anonymous>)
  at useComponentMetaParser (/D:/next/sse-nuxt-ui/docs/node_modules/nuxt-component-meta/dist/parser.mjs:36:28)
  at /D:/next/sse-nuxt-ui/docs/node_modules/nuxt-component-meta/dist/module.mjs:182:16
  at async /D:/next/sse-nuxt-ui/docs/node_modules/nuxt/dist/index.mjs:2345:7
  at async generateApp (/D:/next/sse-nuxt-ui/docs/node_modules/nuxt/dist/index.mjs:5182:3)
  at async _applyPromised (/D:/next/sse-nuxt-ui/docs/node_modules/perfect-debounce/dist/index.mjs:54:10)
@adamdehaven
Copy link

This should be resolved as of 0.9.0 https://github.com/nuxtlabs/nuxt-component-meta/releases/tag/v0.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants