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

Using vuei18n-bridge gives error about using Composition API before functions #1651

Open
4 tasks done
Lehren opened this issue Dec 5, 2023 · 0 comments
Open
4 tasks done
Labels
Status: Review Needed Request for review comments

Comments

@Lehren
Copy link

Lehren commented Dec 5, 2023

Reporting a bug?

I followed the instructions for the Legacy API for version 2.6 in the migration guide.

But as soon as I open my app, I get an error:
[vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function.

Screenshot 2023-12-05 at 15 51 27

I tried poking around, and it seems it is caused by the import of createI18n , it also tries to use the file vue-composition-api.mjs to check for the installation of composition API, but my app will refer to vue-composition-api.common.js when calling Vue.use(VueCompositionAPI)

That might have something to do with it.

I already tried a fix I saw on Stackoverflow about moving the CompositionAPI import and Use to a different file, but that did not help.

Expected behavior

The migration guide to give correct working instructions

Reproduction

Have a Vue app on 2.6.
Install Dependencies
Try to perform the migration guide to install vue-i18n-bridge

System Info

System:
    OS: macOS 14.0
    CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
    Memory: 189.57 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
    npm: 6.14.8 - /usr/local/bin/npm
  Browsers:
    Chrome: 119.0.6045.199
    Firefox: 88.0.1
    Safari: 17.0
  npmPackages:
    @vue/composition-api: ^1.7.2 => 1.7.2 
    @vue/test-utils: ^1.0.0-beta.25 => 1.2.2 
    vue: ^2.6.14 => 2.6.14 
    vue-axios: ^3.5.2 => 3.5.2 
    vue-chartjs: ^4.1.2 => 4.1.2 
    vue-drag-drop: ^1.1.4 => 1.1.4 
    vue-i18n: ^8.26.1 => 8.26.1 
    vue-i18n-bridge: ^9.8.0 => 9.8.0 
    vue-loader: ^15.9.5 => 15.9.8 
    vue-material-design-icons: ^5.1.2 => 5.1.2 
    vue-modal-dialogs: ^3.0.0 => 3.0.0 
    vue-multiselect: ^2.1.6 => 2.1.6 
    vue-select: git+https://github.com/eriknygren/vue-select.git#3aec695 => 2.4.0 
    vue-template-compiler: ^2.6.14 => 2.6.14 
    vue3-click-away: ^1.2.4 => 1.2.4 
    vuedraggable: ^2.24.3 => 2.24.3

Screenshot

No response

Additional context

No response

Validations

@Lehren Lehren added the Status: Review Needed Request for review comments label Dec 5, 2023
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