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

[unhandledRejection] Declaration or statement expected - @nuxt/i18n + nuxt-typed-router #3091

Open
danekslama opened this issue Sep 7, 2024 · 1 comment

Comments

@danekslama
Copy link

danekslama commented Sep 7, 2024

Environment

Operating System: Windows 11

Packages:
@esbuild/[email protected] extraneous
@nuxtjs/[email protected]
@parcel/[email protected] extraneous
@parcel/[email protected] extraneous
@rollup/[email protected] extraneous
@rollup/[email protected] extraneous
[email protected] extraneous
[email protected]
[email protected].

Package Manager: npm

Reproduction

  1. Install nuxt-typed-router
  2. Install @nuxtjs/i18n
  3. Set strategy for @nuxtjs/i18n in nuxt.config.ts to 'prefix'
  4. Get [unhandledRejection] Declaration or statement expected during build

https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-qm6vpw?file=package.json,nuxt.config.ts,i18n.config.ts

Describe the bug

When both I18n and nuxt-typed-router are installed and strategy for I18n is set to "prefix", the nuxt-typed-router throws this exception:

[unhandledRejection] Declaration or statement expected. (128:8)

Additional context

No response

Logs

No response

@danekslama danekslama changed the title [unhandledRejection] Declaration or statement expected. [unhandledRejection] Declaration or statement expected - @nuxt/i18n + nuxt-typed-router Sep 7, 2024
@BobbieGoede
Copy link
Collaborator

You will probably have better luck opening an issue in the repository of nuxt-typed-router, I haven't looked into how it works but it may be relying on internal/undocumented logic to generate its types (just guessing).

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