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

[vue3] vue-i18n reports errors in the component that rendered with render() function #2023

Open
4 tasks done
SZD0319 opened this issue Nov 20, 2024 · 0 comments
Open
4 tasks done
Labels
Status: Review Needed Request for review comments

Comments

@SZD0319
Copy link

SZD0319 commented Nov 20, 2024

Reporting a bug?

execute useI18n() in the component that rendered with render() function,it reports the error: Cannot read properties of null (reading '__VUE_I18N_SYMBOL__')

Expected behavior

work normally

Reproduction

Hello.vue

import { useI18n } from "vue-i18n";

const i18n = useI18n();

render function:

import { h, render } from "vue"
import Hello form "./Hello.vue"

const vnode = h(Hello, {})
render(vnode, document.body)

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700
    Memory: 17.40 GB / 31.62 GB
  Binaries:
    Node: 20.16.0 - D:\development\nvm\nodejs\node.EXE
    npm: 10.9.0 - D:\development\nvm\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @vitejs/plugin-vue: ^5.0.5 => 5.1.3 
    @vue/eslint-config-prettier: ^9.0.0 => 9.0.0 
    @vue/eslint-config-typescript: ^13.0.0 => 13.0.0 
    @vue/tsconfig: ^0.5.1 => 0.5.1 
    vite: ^5.4.11 => 5.4.11 
    vite-plugin-vue-devtools: ^7.3.1 => 7.4.4 
    vue: ^3.5.4 => 3.5.4 
    vue-i18n: ^10.0.4 => 10.0.4 
    vue-router: ^4.3.3 => 4.4.4 
    vue-tsc: ^2.0.21 => 2.1.6

Screenshot

No response

Additional context

No response

Validations

@SZD0319 SZD0319 added the Status: Review Needed Request for review comments label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

1 participant