ウェブサイト検索

TypeScript - Vercelを通してpackage.jsonを変更するには?


Vercelでポートフォリオをデプロイしようとしていますが、デプロイ時にエラーが発生します:

src/components/header/ChangeLanguage.vue(12,25): error TS7016: Could not find a declaration file for module 'vue-i18n'. '/vercel/path0/node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js' implicitly has an 'any' type. There are types at '/vercel/path0/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.

私もローカルでこの問題がありましたが、node_modules/vue-i18n/package.json ファイルに "types":"./dist/vue-i18n.d.ts" を追加することで修正しました

しかし、私はこれを制御していないため、Vercelを通じて同じファイルを変更することはできません。解決策は何ですか?

よろしくお願いします