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.

Does not work with Create React App

See original GitHub issue

Hey,

I have followed the official docs but yet unable to make it work with my react app. I use create-react-app utility and not webpack and babel. It does create coverage and .nyc_output folder but no coverage is being calculated.

npx nyc report --reporter=text-summary

=========== Coverage summary ===============================
Statements   : Unknown% ( 0/0 )
Branches     : Unknown% ( 0/0 )
Functions    : Unknown% ( 0/0 )
Lines        : Unknown% ( 0/0 )
==============================================================

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
bahmutovcommented, Sep 6, 2019

@judsoncarver See a couple of TypeScript examples linked in https://github.com/cypress-io/code-coverage#examples Since TS files are NOT automatically included in the report, you need to add NYC settings like https://github.com/lluia/cypress-typescript-coverage-example/blob/master/package.json#L13 I think

"nyc": {
  "extends": "@istanbuljs/nyc-config-typescript",
  "all": true
}
3reactions
bahmutovcommented, Aug 15, 2019

You can use https://github.com/cypress-io/instrument-cra to instrument CRA v3 apps without ejecting the scripts

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create React App not working - Stack Overflow
1. update the npm version (npm install npm@latest -g) · 2. clear the cache (npm cache clean --force) · 3. create the react...
Read more >
What To Do if create-react-app Doesn't Work
1. npm uninstall -g create-react-app. This is the npm command to uninstall your global installation of create-react-app .
Read more >
npx create-react-app not working? Here's the solution.
The current solution is simple — run create-react-app and target the latest version. Run creact-react-app using the latest version. npx create- ...
Read more >
npx create-react-app is not working · Issue #10132 - GitHub
I am able to solve the problem by first trying to uninstall the npm globally, update the npm, clear the cache then using...
Read more >
The problem with adopting create-react-app for production
But in real life, your application will not stay within the proposed limits of the create-react-app framework. Sooner or later, your app will...
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