question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vue-i18n-bridge: vue-tsc throws TS errors

See original GitHub issue

Reporting a bug?

node_modules/vue-i18n-bridge/dist/vue-i18n-bridge.d.ts:1:15 - error TS2614: Module '"vue"' has no exported member 'App'. Did you mean to use 'import App from "vue"' instead?

1 import type { App } from 'vue';
                ~~~

node_modules/vue-i18n-bridge/dist/vue-i18n-bridge.d.ts:2:15 - error TS2614: Module '"vue"' has no exported member 'ComponentInternalInstance'. Did you mean to use 'import ComponentInternalInstance from "vue"' instead?

2 import type { ComponentInternalInstance } from 'vue';
                ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/vue-i18n-bridge/dist/vue-i18n-bridge.d.ts:3:15 - error TS2614: Module '"vue"' has no exported member 'ComputedRef'. Did you mean to use 'import ComputedRef from "vue"' instead?

3 import type { ComputedRef } from 'vue';
                ~~~~~~~~~~~

node_modules/vue-i18n-bridge/dist/vue-i18n-bridge.d.ts:7:10 - error TS2614: Module '"vue"' has no exported member 'InjectionKey'. Did you mean to use 'import InjectionKey from "vue"' instead?

7 import { InjectionKey } from 'vue';
           ~~~~~~~~~~~~

node_modules/vue-i18n-bridge/dist/vue-i18n-bridge.d.ts:45:15 - error TS2614: Module '"vue"' has no exported member 'WritableComputedRef'. Did you mean to use 'import WritableComputedRef from "vue"' instead?

45 import type { WritableComputedRef } from 'vue';
                 ~~~~~~~~~~~~~~~~~~~


Found 5 errors.

Expected behavior

No errors should be thrown

Reproduction

Set up a simple project with vue 2, vue-tsc and i18n libs

System Info

System:
    OS: macOS 12.0.1
    CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
    Memory: 217.01 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 3.1.0 - ~/.nvm/versions/node/v16.13.0/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 95.0.4638.69
    Firefox: 70.0.1
    Safari: 15.1
  npmPackages:
    @vue/cli-plugin-babel: ~5.0.0-rc.0 => 5.0.0-rc.0 
    @vue/cli-plugin-unit-jest: ~5.0.0-rc.0 => 5.0.0-rc.0 
    @vue/cli-service: ~5.0.0-rc.0 => 5.0.0-rc.0 
    @vue/composition-api: ~1.4.0 => 1.4.0 
    @vue/eslint-config-prettier: ~6.0.0 => 6.0.0 
    @vue/eslint-config-typescript: ~9.0.1 => 9.0.1 
    @vue/runtime-core: ~3.2.22 => 3.2.22 
    @vue/runtime-dom: ~3.2.22 => 3.2.22 
    @vue/test-utils: ~1.2.2 => 1.2.2 
    @vue/vue2-jest: ~27.0.0-alpha.3 => 27.0.0-alpha.3 
    vite: ~2.6.14 => 2.6.14 
    vite-plugin-time-reporter: ~1.0.0 => 1.0.0 
    vite-plugin-ts-nameof: ~1.1.0 => 1.1.0 
    vite-plugin-vue2: ~1.9.0 => 1.9.0 
    vue: ~2.6.14 => 2.6.14 
    vue-chartjs: ~3.5.1 => 3.5.1 
    vue-frag: ~1.3.1 => 1.3.1 
    vue-i18n: ~8.26.7 => 8.26.7 
    vue-i18n-bridge: ~9.2.0-beta.18 => 9.2.0-beta.18 
    vue-moment: ~4.1.0 => 4.1.0 
    vue-resource: ~1.5.3 => 1.5.3 
    vue-router: ~3.5.3 => 3.5.3 
    vue-shortkey: ~3.1.7 => 3.1.7 
    vue-template-compiler: ~2.6.14 => 2.6.14 
    vue-tsc: ~0.29.5 => 0.29.5 
    vuedraggable: ~2.24.3 => 2.24.3 
    vuetify: ~2.5.14 => 2.5.14

Screenshot

image

Additional context

The bridge should maybe use vue-demi or just @vue/composition-api instead of vue

Validations

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kazuponcommented, Nov 18, 2021

Happy coding! 😃

1reaction
kazuponcommented, Nov 16, 2021

Thank you for your reproduction repo! I’ll try to check your repo!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Thousands of TS errors · Issue #65 · johnsoncodehk/vue-tsc
My companies project uses vue-tsc ~0.3.0 and ... to update all dependencies and now when I run yarn vue-tsc --noEmit I get 3780...
Read more >
Volar and vue-tsc are showing different TS errors
In my Vite + Vue 3 + TypeScript project I have configured vue-tsc to run in watch mode while I am developing. I...
Read more >
Exception Handling - TypeScript Deep Dive
JavaScript has an Error class that you can use for exceptions. You throw an error with the throw keyword. You can catch it...
Read more >
vite-plugin-ts-checker
Start using vite-plugin-ts-checker in your project by running `npm i ... checker: 'tsc' | 'vue-tsc' /** * Throw in build mode if has...
Read more >
AWS Lambda function errors in TypeScript
AWS Lambda catches the error and generates a JSON document. ... This response shows that the error happened at line 2, column 11...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found