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 3.3.1/3.3.0/3.2.0: Error TS2688: Cannot find type definition file for '../sinon'

See original GitHub issue

Current behavior:

After I have upgraded from Cypress 3.1.5 to 3.3.0, Cypress is throwing the error on compile

TypeScript error: node_modules/cypress/types/sinon-chai/index.d.ts(10,23): Error TS2688: Cannot find type definition file for ‘…/sinon’.

Then I have tried 3.2.0 and had the same issue. When revered to 3.1.5 - issue is gone.

I have tried to remove node_modules, clear npm cash and make a clean installation for every version of Cypress. No luck.

2019-05-21_1010

Desired behavior:

3.2.0 and 3.3.0 should compile and run tests without issues.

Steps to reproduce: (app code and test code)

Versions

Cypress: 3.3.0/3.2.0 macOS Mojave v.10.14.5 Chrome 74, Electron 59/61

Package.json

"devDependencies": {
        "@angular-devkit/build-angular": "^0.13.8",
        "@angular/cli": "~6.1.2",
        "@angular/compiler-cli": "^6.1.0",
        "@angular/language-service": "^6.1.0",
        "@cypress/browserify-preprocessor": "^1.1.2",
        "@storybook/addon-actions": "^5.0.10",
        "@storybook/addon-links": "^5.0.10",
        "@storybook/addon-notes": "^5.0.10",
        "@storybook/addons": "^5.0.10",
        "@storybook/angular": "^5.0.10",
        "@types/jest": "^23.3.1",
        "@types/new-relic-browser": "0.1072.3",
        "@types/node": "~8.9.4",
        "@types/popper.js": "1.11.0",
        "@types/react": "^16.4.8",
        "@types/webpack-env": "^1.13.6",
        "babel-loader": "^8.0.5",
        "codelyzer": "~4.2.1",
        "cypress": "3.3.0",
        "cypress-cucumber-preprocessor": "^1.6.0",
        "del-cli": "^1.1.0",
        "husky": "^1.1.2",
        "icon-font-generator": "^2.1.8",
        "jest": "^23.4.2",
        "jest-canvas-mock": "^1.1.0",
        "jest-date-mock": "^1.0.5",
        "jest-preset-angular": "^6.0.0",
        "jest-teamcity-reporter": "^0.9.0",
        "json-sass": "^1.3.5",
        "lint-staged": "^7.2.0",
        "node-sass": "^4.12.0",
        "prettier": "^1.14.1",
        "protractor": "^5.4.1",
        "start-server-and-test": "^1.7.13",
        "ts-node": "~5.0.1",
        "tsify": "^4.0.1",
        "tslint": "~5.9.1",
        "tslint-config-prettier": "^1.14.0",
        "typescript": "^2.9.2"
    }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Postavshikcommented, May 30, 2019

Is anybody looked at this issue?

1reaction
bahmutovcommented, Jun 4, 2019

@Postavshik I have changed the reference comment and added a few sinon-chai tests in https://github.com/cypress-io/cypress/pull/4382 let’s see if that solves the issue when it is released

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find type definition file for 'cypress'.ts - Stack Overflow
My problem was solved by installing latest cypress types. npm i -D @types/cypress@latest.
Read more >
Cannot find type definition file for 'node' in TypeScript
To solve the error "Cannot find type definition file for node", install the `node` types by running `npm i -D @types/node`. If the...
Read more >
What do "Cannot find type definition file for x" errors even mean?
npm i @types/x. And It solves this issue, but today I get the error: error TS2688: Cannot find type definition file for 'jsonwebtoken...
Read more >
cypress-io/cypress - Gitter
I cannot find the issue on github offhand, but I hope one of the cypress devs ... error Cannot find type definition file...
Read more >
Error TS2688: Cannot find type definition file for 'node'
If am receiving this error when running the vtex link command: Webpack for react@3.x builder finished in 464ms with errors: [at-loader] ...
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