question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@cypress/grep cannot find module cypress-grep or it's corresponding type declarations

See original GitHub issue

Current behavior

Support file, Config file, and the tsconfig file installation instructions are incorrect.

Module names and paths are incorrect.

Support file: I am getting a could not find a declaration file for module @cypress/grep/src/support as that’s what I have at the moment. Following the readme, the error is Cannot find module ‘cypress-grep’. Additionally, the function appears to be cypressGrep and not registerCypressGrep.

Config file registration: require('@cypress/grep/src/plugin')(config)

tsconfig.json: the types array addition should be "@cypress/grep"

I am probably missing something.

Desired behavior

I am able to install the package, follow the configuration instructions, grepping specs works.

Test code to reproduce

n/a

Cypress Version

10.10.0

Node version

16.17.1

Operating System

Windows 10

Debug Logs

No response

Other

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cypress-bot[bot]commented, Dec 14, 2022

The code for this is done in cypress-io/cypress#24844, but has yet to be released. We’ll update this issue and reference the changelog when it’s released.

1reaction
samtsaicommented, Nov 17, 2022

Note if you’re on Cypress 11, you’ll need to update TestConfigOverrides to SuiteConfigOverrides (unless that’s been updated in main/develop)

/// <reference types="cypress" />
declare namespace Cypress {
  // specify additional properties in the TestConfig object
  // in our case we will add "tags" property
  interface SuiteConfigOverrides {
    /**
     * List of tags for this test
     * @example a single tag
     *  it('logs in', { tags: '@smoke' }, () => { ... })
     * @example multiple tags
     *  it('works', { tags: ['@smoke', '@slow'] }, () => { ... })
     */
    tags?: string | string[]
  }

  interface Cypress {
    grep?: (grep?: string, tags?: string, burn?: string) => void
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

This version has been deprecated - cypress-grep - npm
Start using cypress-grep in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type declarations.
Read more >
Changelog - Cypress Documentation
Fixed an 11.0.0 regression where using custom reporters would cause Cypress to throw a 'Cannot find module' error. Fixes #24607; Fixed testIsolation ...
Read more >
typescript - How To Configure cypress-grep plugin v3.1.0 for ...
Thanks mahadazad for your collaboration. Although this is just a workaround, I hope we'll get a proper solution to this problem very soon....
Read more >
Cannot find module '@/components/HelloWorld.vue' or its
TS2307: Cannot find module 'vue' or its corresponding type declarations. ... to recognize a vue SFC import in a Cypress component test in...
Read more >
ImageCraft C Compiler Guide - Infineon Technologies
Furthermore, Cypress does not authorize its products for use as critical ... you see ImageCraft C Compiler data types, operators, expressions, statements,.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found