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

types for .server pages won't get generated #110

Open
arily opened this issue Aug 1, 2023 · 5 comments
Open

types for .server pages won't get generated #110

arily opened this issue Aug 1, 2023 · 5 comments

Comments

@arily
Copy link

arily commented Aug 1, 2023

Describe the bug
types for .server pages won't be generated

Expected behavior
types for .server pages should be generated like other pages.

Screenshots
image
image

Environnement infos

  • Operating System: Darwin
  • Node Version: v18.16.0
  • Nuxt Version: 3.5.3
  • Nitro Version: 2.4.1
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Your pages folder structure

pages
├── admin
│   ├── index.vue
│   ├── logs.vue
│   └── users.vue
├── admin.vue
├── article
│   ├── [...id].vue
│   └── edit.vue
├── auth
│   ├── login.vue
│   ├── logout.vue
│   └── register.vue
├── beatmap
│   └── [id].server.vue
├── beatmapset
│   └── [id].vue
├── error.vue
├── index.vue
├── leaderboard
│   └── [[mode]].vue
├── me
│   ├── relations.vue
│   └── settings.vue
├── score
│   ├── [id].vue
│   └── index.vue
├── status.vue
└── user
    └── [handle].vue

Your nuxt.config.ts

...
  modules: [
    // '@nuxtjs/color-mode',
    '@nuxtjs/tailwindcss',
    '@pinia/nuxt',
    '@nuxtjs/i18n',
    'nuxt-icon',
    'nuxt-typed-router',
  ],
  i18n: {
    strategy: 'prefix_and_default',
    defaultLocale: 'en-GB',
    locales: [
      {
        code: 'en-GB',
        name: 'English (International)',
      },
      {
        code: 'zh-CN',
        name: '简体中文 (中国)',
      },
    ],
    detectBrowserLanguage: {
      useCookie: true,
      cookieKey: 'n-lang',
      redirectOn: 'root', // recommended
    },
  },
...
@arily arily changed the title types for .server pages won't be generated types for .server pages won't get generated Aug 1, 2023
@victorgarciaesgi
Copy link
Owner

I will look at it, are server routes supposed to be navigated to?

@victorgarciaesgi
Copy link
Owner

Is the route display on your vue/nuxt devtools?

@arily
Copy link
Author

arily commented Aug 19, 2023

Is the route display on your vue/nuxt devtools?

yes.
image

@arily
Copy link
Author

arily commented Aug 19, 2023

I will look at it, are server routes supposed to be navigated to?

right now it navigates with bug:
image
image
(I am on Nuxt 3.5.3 so things may changed)

@victorgarciaesgi
Copy link
Owner

I'll investigate this, to see if there's a way to get the server routes. For now Nuxt isn't providing it for the classic pages behaviour

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

No branches or pull requests

2 participants