kazupon / vue-i18n

:globe_with_meridians: Internationalization plugin for Vue.js

Home Page:https://kazupon.github.io/vue-i18n/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typings TS7016: Could not find a declaration file for module

Farnsi opened this issue · comments

commented

Reporting a bug?

import { createI18n } from 'vue-i18n'
                            ^^^^^^^^

TS-Error

Could not find a declaration file for module 'vue-i18n'.
'/my-project/node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js' implicitly has an 'any' type.
There are types at '/my-project/node_modules/vue-i18n/dist/vue-i18n.d.ts', but this result could
not be resolved when respecting package.json "exports".
The 'vue-i18n' library may need to update its package.json or typings.ts(7016)

Expected behavior

Use .d.ts-file.

Reproduction

https://jsfiddle.net/kazupon/rn724baz/3/

System Info

vue-i18n: 9.2.2
vue: 3.2.47
typescript: 5.0.4

Screenshot

No response

Additional context

No response

Validations

Same error today

commented

As soon as i remove the complete "exports": {block from package.json, it works.

No error and move over import { createI18n } from 'vue-i18n' or $t('... in VSCode shows the correct type definitions.

Same error
vue-i18n: 9.2.2
vue: 3.2.47
typescript: 5.0.4

Fixed in beta version, as soon as they release new versions it will be fixed i suppose, at the time, change to v9.3

Hey, is it possible to release this as a quick fix for version 9.2? :)
The issue prevents us from using TypeScript 5

commented

Temporary solution.
Work in my case, remove file: tsconfig.node.json

This repository is vue-i18n v8, not v9
so close