Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'vue3-recaptcha2' library may need to update its package.json or typings? #13

Open
seriiserii825 opened this issue Jul 13, 2023 · 2 comments

Comments

@seriiserii825
Copy link

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?

@isarhoo
Copy link

isarhoo commented Sep 26, 2023

I have the same problem

@markhermano
Copy link

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" ],
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants