bahmutov / bahmutov/cypress-map

Typescript tsconfig shows error for cypress-map with Cypress 12

Open
#69 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
61
Forks
3
Avg merge
4h 48m
Merged PRs (30d)
6

Description

![image](https://github.com/bahmutov/cypress-map/assets/6638055/8e20355b-903c-42de-a756-488d80ebab71)

```
"cypress": "^12.17.1",
"cypress-map": "^1.21.0",
```

After my cypress is upgraded to 12.17, tsconfig.json starts to complain about cypress-map.

tsconfig:

```{
"compilerOptions": {
"experimentalDecorators": true,
"baseUrl": "./",
"lib": [
"esnext",
"dom"
],
"module": "esnext",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"esModuleInterop": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"target": "ES2015",
"typeRoots": [
"node_modules/@types",
"cypress"
],
"types": [
"cypress",
"node",
"cypress-map",
"cypress-plugin-api"
]
}
}
```

error:

```

Cannot find type definition file for 'cypress-map'.
The file is in the program because:
Entry point of type library 'cypress-map' specified in compilerOptions
```

It does not affect the test run, but it is annoying. Is there a way to fix it?

Thank you very much.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with Cypress 12.17.1 and cypress-map 1.21.0, then inspect tsconfig.json, especially its types list, alongside how cypress-map exposes its types. Done means the TypeScript error about the missing cypress-map type definition is gone without affecting the test run.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, javascript, typescript
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.