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

Import when using the library in Cypress #142

Open
david-ic3 opened this issue Sep 21, 2023 · 1 comment
Open

Import when using the library in Cypress #142

david-ic3 opened this issue Sep 21, 2023 · 1 comment

Comments

@david-ic3
Copy link

We are trying to use the library with Cypress but are getting a strange typescript error. Any help is appreciated

cypress.config.ts :

import {PdfReader} from "pdfreader";
... some code

the import gives this error :

TS2792: Cannot find module  pdfreader . Did you mean to set the  moduleResolution  option to  nodenext , or to add aliases to the  paths  option?

tsconfig.json :

{
  "compilerOptions": {
    "strict": true,
    "target": "es6",
    "lib": [
      "esnext",
      "dom"
    ],
    "types": [
      "cypress",
      "node",
      "@4tw/cypress-drag-drop",
      "cypress-real-events"
    ]
  },
  "include": [
    "**/*.ts"
  ]
}
@adrienjoly
Copy link
Owner

adrienjoly commented Sep 25, 2023 via email

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

2 participants