node-coveralls icon indicating copy to clipboard operation
node-coveralls copied to clipboard

cat: ./coverage/lcov.info: No such file or directory

Open oronbz opened this issue 9 years ago • 3 comments

Hi, when running istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage

I'm getting "No such file or directory" for ./coverage/lcov.info"

  Array
    #indexOf()
      ✓ should return -1 when the value is not present


  1 passing (5ms)

No coverage information was collected, exit without writing coverage information
cat: ./coverage/lcov.info: No such file or directory

istanbul is installed and running.

Please assist, Thanks.

oronbz avatar Jun 09 '15 16:06 oronbz

Getting the same error too!

dhruvp avatar Sep 30 '15 20:09 dhruvp

+1

janryWang avatar Dec 10 '15 06:12 janryWang

This problem is, in fact, not really related to node-coveralls; The relevant line here is No coverage information was collected, exit without writing coverage information, meaning that istanbul failed to save any coverage information. Guessing from the above example, the problem likely was that there are no actual source files, only tests, meaning that there is no “real” code which got covered.

If you have this error for other reasons and/or it persists even in the presence of actual code files, a full example (e.g. a link to the failing CI test or a copy of the codebase) would probably help in figuring this out.

addaleax avatar Dec 10 '15 06:12 addaleax