vue3-recaptcha2
vue3-recaptcha2 copied to clipboard
The 'vue3-recaptcha2' library may need to update its package.json or typings?
Hi, i have an problem with typescript in vue3 composition api for build.
There are types at '/home/serii/Sites/vue/vue-silcompa/node_modules/vue3-recaptcha2/dist_types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'vue3-recaptcha2' library may need to update its package.json or typings.
I fixed directly in node_modules in vue3-recaptcha2/package.json, replaced this code:
"exports": {
".": {
"import": {
"types": "./dist_types/index.d.ts",
"node": "./index.mjs",
"default": "./dist/vue3-recaptcha2.es.js"
},
"require": "./dist/vue3-recaptcha2.umd.js"
}
},
Can you update the package?
I have the same problem
While waiting for the update, a temporary fix is to create your declaration file and include it in your tsconfig.json
.
types/vue3-recaptcha2.d.ts
declare module 'vue3-recaptcha2'
tsconfig.json
{
"compilerOptions": {
"include": [ "types/**/*.d.ts" ],
}
}