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

Fix typescript error for localization string $t #966

Open
3 tasks done
NabbeunNabi opened this issue Jan 16, 2025 · 0 comments · May be fixed by #967
Open
3 tasks done

Fix typescript error for localization string $t #966

NabbeunNabi opened this issue Jan 16, 2025 · 0 comments · May be fixed by #967
Assignees
Labels
bug Something isn't working code quality i18n research possibility and viability of features

Comments

@NabbeunNabi
Copy link
Contributor

NabbeunNabi commented Jan 16, 2025

Problem

Currently there is a typescript error displaying for files that contain $t for translatable strings. This was previously fixed but seems to have become a problem again. We want to fix this as we do not want any typescript errors within our codebase.

Success

This problem is researched and fixed. There is clear understanding through comments and a well written PR as to why and how this happened so going forward we can make sure this problem doesn't happen again, or can be resolved quickly.

Requirements

  • The cause of the error has been found and understood
  • The error has been fixed
  • There are comments in the code if applicable explaining how this happened so it can be prevented going forward. If comments are not appropriate in the code it is communicated through a clear and thorough PR description.

Implementation notes

This problem started when we updated our dependency in this PR. It should be related to this package version upgrade.

#939

You can checkout into the commit before this PR (by looking at the commits in the main branch) and build .nuxt to see that there are no errors and then checkout into the hash of the commit of the PR to see that the errors then show up.

@NabbeunNabi NabbeunNabi added bug Something isn't working code quality i18n research possibility and viability of features labels Jan 16, 2025
@gminetoma gminetoma linked a pull request Jan 16, 2025 that will close this issue
1 task
@gminetoma gminetoma linked a pull request Jan 16, 2025 that will close this issue
1 task
gminetoma added a commit that referenced this issue Jan 17, 2025
related to [#966](#966)

- Update Nuxt to the latest version
- Add a declaration file containing a patch for the issue
- Update Nuxt config `compatibilityDate` to `compatibilityDate: '2025-01-17'`

The main issue was that Nuxt previously used the @vue/runtime-core namespace to augment the vue namespace. This caused conflicts with any package using vue.

As of Nuxt v3.13.0, they now use the vue namespace directly, which is the recommended approach. However, some packages, such as @auth0/auth0-vue, still rely on @vue/runtime-core, leading to compatibility issues.

Our solution involved creating a declaration file to patch this problem.

references:
https://nuxt.com/blog/v3-13#vue-typescript-changes
https://nuxt.com/blog/v3-15
gminetoma added a commit that referenced this issue Jan 17, 2025
related to #966

- Update Nuxt to the latest version
- Add a declaration file containing a patch for the issue
- Update Nuxt config `compatibilityDate` to `compatibilityDate: '2025-01-17'`

The main issue was that Nuxt previously used the @vue/runtime-core namespace to augment the vue namespace. This caused conflicts with any package using vue.

As of Nuxt v3.13.0, they now use the vue namespace directly, which is the recommended approach. However, some packages, such as @auth0/auth0-vue, still rely on @vue/runtime-core, leading to compatibility issues.

Our solution involved creating a declaration file to patch this problem.

references:
https://nuxt.com/blog/v3-13#vue-typescript-changes
https://nuxt.com/blog/v3-15
gminetoma added a commit that referenced this issue Jan 27, 2025
related to #966

- Update Nuxt to the latest version
- Add a declaration file containing a patch for the issue
- Update Nuxt config `compatibilityDate` to `compatibilityDate: '2025-01-17'`

The main issue was that Nuxt previously used the @vue/runtime-core namespace to augment the vue namespace. This caused conflicts with any package using vue.

As of Nuxt v3.13.0, they now use the vue namespace directly, which is the recommended approach. However, some packages, such as @auth0/auth0-vue, still rely on @vue/runtime-core, leading to compatibility issues.

Our solution involved creating a declaration file to patch this problem.

references:
https://nuxt.com/blog/v3-13#vue-typescript-changes
https://nuxt.com/blog/v3-15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code quality i18n research possibility and viability of features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants