[unhandledRejection] Declaration or statement expected - @nuxt/i18n + nuxt-typed-router
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
- Install nuxt-typed-router
- Install @nuxtjs/i18n
- Set strategy for @nuxtjs/i18n in nuxt.config.ts to 'prefix'
- 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
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).
Closing as typed routing is provided this module with https://i18n.nuxtjs.org/docs/api/options#typedpages