question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

components.d.ts file does not contain NuxtPage components

See original GitHub issue

Environment

  • Operating System: Windows_NT
  • Node Version: v18.7.0
  • Nuxt Version: 3.0.0-rc.9
  • Nitro Version: 0.5.1
  • Package Manager: npm@8.15.0
  • Builder: vite
  • User Config: srcDir, sourcemap, app, typescript
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Describe the bug

I need to import explicitly. When I try to import { NuxtPage } from '#components' I found that the NuxtPage component does not exist

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tada5hicommented, Sep 27, 2022

Thank you very much for your fast reply @danielroe I will open a new issue ☺️ ✌️ I think the cause of the problem is the async setup function.

1reaction
danielroecommented, Sep 25, 2022

If resolveComponent('NuxtPage') is not working, please raise that with a reproduction as a separate issue. 🙏

When you have a pages directory, NuxtPage is registered as a global component and Vue should be able to resolve it when called in a setup or render function.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generate d.ts file for Vue components written in Typescript
So, my idea is to create Vue (typescript) + Vuetify reusable components and install them from NPM in any other project I have....
Read more >
pages/ · Nuxt Directory Structure
Nuxt provides a file-based routing to create routes within your web ... Pages are Vue components and can have the .vue , .js...
Read more >
Built-in Components - Nuxt
The NuxtChild Component. This component is used for displaying the children components in a nested route. Example: -| pages/ ---| parent ...
Read more >
Nuxt 3 Beta First Impressions - Vue School Blog
Nuxt 3 Beta was release on Oct 12, 2021. Here are some first looks into what it looks like and how it compares...
Read more >
Documentation - Creating .d.ts Files from .js files - TypeScript
d.ts files from JavaScript using JSDoc syntax. This set up means you can own the editor experience of TypeScript-powered editors without porting your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found