Node.js Lerna Travis CI CodeCov reports scanning error

450 views Asked by At

We have a Node.js open-source repository and uses Travis for Unit tests, code-coverage (using CodeCov) etc. We just adopted a monorepo approach for our application with Lernajs and tried to modify the travis.yml file as:

language: node_js
node_js:
   - "6"
before_install:
  - sudo apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3
  - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee 
    /etc/apt/sources.list.d/yarn.list
  - sudo apt-get update -qq
  - sudo apt-get install -y -qq yarn
  - yarn && lerna bootstrap --concurrency=1
  - npm install -g codecov
cache:
 directories:
  - $HOME/.yarn-cache
jobs:
  include:
    - stage: ES Lint & Flow
  script: lerna run lint && lerna run flow
    - stage: Unit Tests
  script: lerna test && lerna install -g codecov && lerna run coverage

We used before_install to prepare the Travis agent for Lerna and Yarn. The stages works fine but the problem is it does not upload the reports to codecov displaying the error:

[error] "2017-09-16T10:57:52.285Z"  { ValidationError: "value" is not allowed to be empty
at Object.exports.process (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/joi/lib/errors.js:140:17)
at internals.Any._validateWithOptions (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/joi/lib/any.js:654:25)
at root.validate (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/joi/lib/index.js:100:23)
at /home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/lib/impl/lcov.js:11:37
at tryCatcher (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/bluebird/js/main/util.js:26:23)
at Promise._resolveFromResolver (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/bluebird/js/main/promise.js:483:31)
at new Promise (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/bluebird/js/main/promise.js:71:37)
at Object.parseLcov [as parse] (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/lib/impl/lcov.js:9:20)
at Object.module.exports [as handleInput] (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/lib/handleInput.js:26:54)
at Socket.<anonymous> (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/bin/codacy-coverage.js:45:20)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

Anyone has any idea about this issue? We want to resolve this keeping Lerna.

0

There are 0 answers