Skip to content

_ctx.$localePath is not a function

Closed

Description

Environment


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.5.3
  • Nitro Version: 2.4.1
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: modules
  • Runtime Modules: @nuxtjs/[email protected]
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-6vqdsb?file=app.vue,package.json,nuxt.config.ts

Describe the bug

According to documentation available at https://v8.i18n.nuxtjs.org/guide/migrating#change-some-export-apis-name-on-nuxt-context it seems that API methods have to be prefixed with $, however it results in 500 error (_ctx.$localePath is not a function).

This works, but shows type error in VSCode
Screenshot 2023-06-17 at 02 12 33

This does not work and results in 500 error
Screenshot 2023-06-17 at 02 12 47

This does work
Screenshot 2023-06-17 at 02 13 02

Additional context

No response

Logs

No response

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

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions