Skip to content

fix: added fallback mechanism to find right files - #7

Open
EragonJ wants to merge 1 commit into
achingbrain:masterfrom
EragonJ:fix-bug
Open

fix: added fallback mechanism to find right files#7
EragonJ wants to merge 1 commit into
achingbrain:masterfrom
EragonJ:fix-bug

Conversation

@EragonJ

@EragonJ EragonJ commented Dec 28, 2021

Copy link
Copy Markdown

Reference: https://travis-ci.org/github/achingbrain/it/jobs/768135382

@achingbrain, as you can see, if you check the log from achingbrain/it closely, coveralls-lerna is not working as expected even in the latest build.

Error: ENOENT: no such file or directory, open 'index.js'
    at Object.openSync (fs.js:476:3)
    at Object.readFileSync (fs.js:377:35)
    at getSourceFromFile (/home/travis/build/achingbrain/it/node_modules/coveralls-lerna/lib/util/helpers.js:15:13)
    at /home/travis/build/achingbrain/it/node_modules/coveralls-lerna/lib/parse/parse-lcov.js:27:26
    at Array.forEach (<anonymous>)
    at convertLcovSectionToCoverallsSourceFile (/home/travis/build/achingbrain/it/node_modules/coveralls-lerna/lib/parse/parse-lcov.js:24:20)
    at /home/travis/build/achingbrain/it/node_modules/coveralls-lerna/lib/parse/parse-lcov.js:63:21
    at Array.map (<anonymous>)
    at Object.module.exports [as lcov] (/home/travis/build/achingbrain/it/node_modules/coveralls-lerna/lib/parse/parse-lcov.js:63:6)
    at parse (/home/travis/build/achingbrain/it/node_modules/coveralls-lerna/lib/parse.js:24:25) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'in

I also encountered the same problem on my side and since the built lcov file is basically without workingDirectory information so that's why it doesn't work.

I am not sure whether coveralls-lerna did work well before, but somehow it's not working anymore because lcov.info is not with correct path information anymore.

Hope this quick fix gives you an idea about what the bug is happening now. I hope this change can be merged and the version can be released here, so feel free to advise this PR or just make a new one with proper solution.

Big thanks :)

@EragonJ
EragonJ force-pushed the fix-bug branch 2 times, most recently from e6ad32c to c40b92f Compare December 28, 2021 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant