Skip to content

Peer dependency missing for mocha reporters but cannot install Mocha #478

@GrayedFox

Description

@GrayedFox

Hello there,

I get the following error when mocha is included as a dependency inside my browserstack.json:

npm ERR! 
code EEXIST
npm ERR! path .\node_modules\.bin\_mocha

npm ERR!
 Refusing to delete .\node_modules\.bin\_mocha: is outside .\node_modules\mocha and not a link
npm ERR! File exists: .\node_modules\.bin\_mocha
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

Problematically, the deps required for Cypress to generate reports are as follows:

        "npm_dependencies": {
          "@frsource/cypress-plugin-visual-regression-diff": "2.3.12",
          "@types/chance": "1.1.3",
          "cypress": "11.2.0",
          "mocha": ">=7.0.0",
          "chance": "1.1.9",
          "cypress-mochawesome-reporter": "3.2.3",
          "cypress-multi-reporters": "1.6.2",
          "cypress-wait-for-stable-dom": "0.1.0",
          "mocha-junit-reporter": "2.2.0"
        }

I am probably going to have to remove the custom reporters on this branch for now just to get BrowserStack running the tests, would be good if someone knows a workaround or fix for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions