Couldn't determine Mocha version
See original GitHub issueHi,
I have issue with cypress when the project is stored in a different folder then root, for example:
cypress run --project=apps/site-e2e
Deps installed:
"mocha": "6.1.4",
"mocha-junit-reporter": "1.23.0",
I presume the problem is because the packages json path start with ./
In fact just add fs.readFileSync(__dirname + "/../node_modules/mocha/package.json", "utf8") seems to work, but of course there are many way to aim that.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Couldn't determine Mocha version · Issue #4602 - GitHub
Current behavior: Couldn't determine Mocha version This has been printing at the beginning of my test since the upgrade to 3.3.2.
Read more >No Mocha version is shown in the package.json when testing ...
I am heading to the package.json doing the search, but finding no mocha dependencies. Does it mean that mocha is built into cypress?...
Read more >Couldn't determine Mocha version - Bountysource
Current behavior: Couldn't determine Mocha version. This has been printing at the beginning of my test since the upgrade to 3.3.2.
Read more >mocha-spec-json-reporter-2 - npm package - Snyk
Unable to detect license. We couldn't find an appropriate license for this project. It is highly advised to make sure the project license...
Read more >Reporters | Cypress Documentation
History. Version, Changes. 4.4.2, Custom Mocha reporters updated to use the version of Mocha bundled with Cypress. No ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The package json is on the project root
But i think the best approach is to make it work without setting any flag, should be transparent for the user.
What do you think about this approach:
I can open a PR if you wish 😃
Released in mocha-junit-reporter@1.23.1 work as expected 🥇