Coveralls coverage suddenly started work with errors on GitLab and Appveyor with the same call

601 Views Asked by At

Usually I used the similar .gitlab-ci.yml code to send reports to coveralls for some of my repos:

install_dependencies:
  stage: build
  script:
    - npm install -g gulp nyc
    - npm install coveralls
    - npm install
  artifacts:
    paths:
      - node_modules/

testing:
  stage: test
  script:
    - npx nyc gulp test
    - npx nyc report --reporter=html
    - npx nyc report --reporter=text-lcov | npx ./node_modules/coveralls/bin/coveralls.js
  artifacts:
    paths:
      - public
      - coverage
      - .nyc_output

And on Appveyor:

install:
  - ps: Install-Product node $env:nodejs_version
  - npm install -g gulp nyc coveralls
  - npm install

test_script:
  - node --version
  - npm --version
  - gulp --version
  - cmd: npx nyc gulp test

after_test:
  cmd: npx nyc report --reporter=text-lcov | npx coverall

It worked well few months ago, but today I found that it doesn't work anymore for all my repos, I got the error:

npm ERR! code ENOTDIR
npm ERR! syscall open
npm ERR! path /builds/username/proj/node_modules/coveralls/bin/coveralls.js/package.json
npm ERR! errno -20
npm ERR! ENOTDIR: not a directory, open '/builds/username/proj/node_modules/coveralls/bin/coveralls.js/package.json'
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-11-06T03_01_59_736Z-debug.log
node:events:304
      throw er; // Unhandled 'error' event
      ^
Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:162:15)
    at writeGeneric (node:internal/stream_base_commons:153:3)
    at Socket._writeGeneric (node:net:763:11)
    at Socket._write (node:net:775:8)
    at writeOrBuffer (node:internal/streams/writable:388:12)
    at Socket.Writable.write (node:internal/streams/writable:333:10)
    at ConsoleWriter.write (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-lib-report/lib/file-writer.js:80:28)
    at ConsoleWriter.println (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-lib-report/lib/file-writer.js:35:14)
    at TextLcov.onDetail (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-reports/lib/lcovonly/index.js:31:16)
    at Visitor.value (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-lib-report/lib/tree.js:38:38)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:80:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
npm ERR! code 1
npm ERR! path /builds/username/proj
npm ERR! command failed
npm ERR! command sh -c nyc report '--reporter=text-lcov'

When I've installed coveralls module globally and changed the command to … | npx coveralls:

npm WARN exec The following package was not found and will be installed: coveralls
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
/root/.npm/_npx/4d97078606416726/node_modules/coveralls/bin/coveralls.js:19
      throw err;
      ^
Bad response: 500 {"message":"Build processing error.","error":true,"url":""}
(Use `node --trace-uncaught ...` to show where the exception was thrown)
npm ERR! code 1
npm ERR! path /builds/username/proj
npm ERR! command failed
npm ERR! command sh -c coveralls

The same, but shorter, on Appveyor for now:

C:\Users\appveyor\AppData\Roaming\npm\node_modules\coveralls\bin\coveralls.js:19
      throw err;
      ^
Bad response: 500 {"message":"Build processing error.","error":true,"url":""}
Command exited with code 1

I can't understand, is it temporary problem of Coveralls, or Istanbul/NYC, or some changes took the place permanently, and the code should be changed accordingly in some way.

0

There are 0 best solutions below