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.

npm run cover fails

See original GitHub issue

| => npm run cover

react-ava-workshop@1.0.0 cover /Users/coryhouse/Desktop/projects/react-ava-workshop nyc npm run test

react-ava-workshop@1.0.0 test /Users/coryhouse/Desktop/projects/react-ava-workshop ava “app/*/.test.js” --verbose

✔ store › Customers › customers should start with empty ✔ store › Customers › setting customers and getting them ✔ containers › CustomerList › Renders no customers and add button ✔ components › Toggle › toggle–off class applied by default ✔ store › Customers › subscribing to the store ✔ components › Toggle › toggle–on class applied when initialToggledOn specified to true ✔ containers › CustomerList › Renders customers and add button ✔ containers › CustomerList › Responds to store updates ✔ components › Toggle › invokes the onToggle prop when clicked ✔ containers › CustomerList › unsubscribes when unmounted

10 tests passed

/Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/report/html.js:241 text = structuredText[startLine].text; ^

TypeError: Cannot read property ‘text’ of undefined at /Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/report/html.js:241:45 at Array.forEach (native) at annotateFunctions (/Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/report/html.js:224:26) at HtmlReport.Report.mix.writeDetailPage (/Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/report/html.js:427:9) at /Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/report/html.js:489:26 at SyncFileWriter.extend.writeFile (/Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/util/file-writer.js:57:9) at FileWriter.extend.writeFile (/Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/util/file-writer.js:147:23) at /Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/report/html.js:488:24 at Array.forEach (native) at HtmlReport.Report.mix.writeFiles (/Users/coryhouse/Desktop/projects/react-ava-workshop/node_modules/istanbul/lib/report/html.js:482:23)

npm ERR! Darwin 15.4.0 npm ERR! argv “/Users/coryhouse/.nvm/versions/node/v5.6.0/bin/node” “/Users/coryhouse/.nvm/versions/node/v5.6.0/bin/npm” “run” “cover” npm ERR! node v5.6.0 npm ERR! npm v3.6.0 npm ERR! code ELIFECYCLE npm ERR! react-ava-workshop@1.0.0 cover: nyc npm run test npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-ava-workshop@1.0.0 cover script ‘nyc npm run test’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the react-ava-workshop package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! nyc npm run test npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-ava-workshop npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls react-ava-workshop npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/coryhouse/Desktop/projects/react-ava-workshop/npm-debug.log

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kentcdoddscommented, Apr 5, 2016

high-five-explosion-JQNM4AgN7lFUA

1reaction
coryhousecommented, Apr 5, 2016

This is awesome! Superb timing since exactly what I was looking for today! Great work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

when test coverage falls below 98%, npm run test throws an ...
Issue Type. Bug. Description. When test coverage falls below 98%, 'npm run test' throws an error instead of ending. Steps to reproduce.
Read more >
npm test -- --coverage never exits - node.js - Stack Overflow
Explanation: The problem was coming from Jest not being able to close all processes. The above is a quick workaround. Ideally you should...
Read more >
Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >
Coverage | Code Cookbook - Michael Currin
Tests with no coverage. $ npm run test:coverage. Tests, followed by CLI coverage report.
Read more >
Troubleshooting - Create React App
npm start fail due to watch error​ ... If you are using a Linux operating system and see an error similar to: ENOSPC:...
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