Reputation: 21
I have a vaadin 23, Spring boot 2.7.6 app. I created a typescript component for users to enter their phone numbers. I used the intl-tel-input npm package to do so. Everything works fine except for the i18n part when I want to use the intl-tel-input provided translations. I read the docs and they say I should import the language I want this way:
import fr from "intl-tel-input/i18n/fr";
But this gives me the following error:
TS2307: Cannot find module intl-tel-input/i18n/fr or its corresponding type declarations.
I can import import intlTelInput from 'intl-tel-input';
perfectly well and the component works fine. It is only the translation part that is proving challenging.
I can see the i18n folder under intl-tel-input/build/js/i18n
but I can't import anything from there and it doesn't match what is said in the docs.
What am I doing wrong ?
I already tried a few different ways to import from intl-tel-input/build/js/i18n/fr
(again, not the right folder according to the docs).
I tried modifying my types.d.ts to declare the intl-tel-input//i18n
module but it is not working.
Upvotes: 2
Views: 577