Vue import trouble: cannot find module or its corresponding type declarations
Hi, I am having trouble trying to import the Vue component and am not sure if I am doing it correctly.
I am getting a Cannot find module 'intl-tel-input/vue' or its corresponding type declarations. error.
I have also tried importing just like from the demo/readme with import IntlTelInput from 'intl-tel-input/vueWithUtils'; and same issue.
The version I am on is 24.6.0
Is there any way to fix this? Here is my tsconfig.json below:
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
},
"lib": [
"ESNext",
"dom",
"dom.iterable",
"scripthost"
],
},
"references": [
{
"path": "./tsconfig.node.json"
}
],
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
"exclude": [
"node_modules",
"packages/**/dist/**"
]
}
Unfortunately, the vue component doesn't have types yet: https://github.com/jackocnr/intl-tel-input/issues/1794
As I say in that thread, the Vue Component is actually very simple - it should be easy to add them. I don't have time to implement this myself, but would welcome a pull request.