-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nyc failing sometimes on Bitbucket's Pipeline #706
Comments
I see the same error intermittently on travis |
any updates/work around on this? i was planning to use this and it seems to fail intermittently with the above error |
@andre991, @arupadhy, @brollins90 would any of you be able to share a codebase that is having this issue? Once we have a repo that reproduces this issue, perhaps we can release a version of nyc that has a debug statement in |
@bcoe unfortunately, i can't share the codebase. This does not happen in every run. Can't promise but I will try to create a public typescript project with the above problem in coming week |
@arupadhy oh, that's a useful piece of information that you're using TypeScript; are you also using |
Tried removing --all option, no luck yet. here is the trace npm info lifecycle composite-service@0.42.1~check-coverage: Failed to exec check-coverage script This is how "check-coverage" is declared "check-coverage": "NODE_ENV=test LOG_LEVEL=info nyc --report-dir spec/coverage --reporter cobertura --reporter html npm run test-coverage" "test-coverage": "NODE_ENV=test ./node_modules/mocha/bin/_mocha --timeout 30000 -R mocha-multi --reporter-options spec=-,xunit=spec/reports/xunit.xml './dist/spec/unit///*.js'" |
Just curious, does your setup look something like this? https://istanbul.js.org/docs/tutorials/typescript/ |
this is how my .nycrc looks { Rest of the options for nyc are used within the script (see ^^) |
@team was this issue reproducible at your end? |
This was failing reliably with our project; I whittled things down to the minimum that would still fail reliably, and that whittled result is available at https://github.com/mbradburn/istanbul-test-case The stack trace looks like: /Users/mjb/w2/istanbul-test-case/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/transformer.js:97 TypeError: mappedCoverage.addStatement is not a function |
I have the same error in VSTS. |
I'm seeing the same error and stack trace as @mbradburn. My
The script running
Haven't yet tried to isolate/repro, there are plenty of other parts at play (as implied by the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I tried to run nyc in bitbucket's pipeline, but sometimes the builds fails with this error. However, running locally on my machine, this error does not occur.
nyc version: 11.2.1
OS(Local): macOS High Sierra 10.13
OS(Pipeline): Linux 4.13.5-coreos-r2
npm version: 3.10.10
node version: 6.9.4
npm info ok
/opt/atlassian/pipelines/agent/build/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/transformer.js:97
mappedCoverage.addStatement(mapping.loc, hits);
^
TypeError: mappedCoverage.addStatement is not a function
at /opt/atlassian/pipelines/agent/build/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/transformer.js:97:28
at Array.forEach (native)
at SourceMapTransformer.processFile (/opt/atlassian/pipelines/agent/build/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/transformer.js:88:34)
at /opt/atlassian/pipelines/agent/build/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/transformer.js:169:24
at Array.forEach (native)
at SourceMapTransformer.transform (/opt/atlassian/pipelines/agent/build/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/transformer.js:159:25)
at MapStore.transformCoverage (/opt/atlassian/pipelines/agent/build/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/map-store.js:143:8)
at SourceMaps.remapCoverage (/opt/atlassian/pipelines/agent/build/node_modules/nyc/lib/source-maps.js:29:41)
at NYC._getCoverageMapFromAllCoverageFiles (/opt/atlassian/pipelines/agent/build/node_modules/nyc/index.js:426:30)
at NYC.report (/opt/atlassian/pipelines/agent/build/node_modules/nyc/index.js:432:18)
npm info lifecycle dsm-api@1.0.0~unit-coverage: Failed to exec unit-coverage script
npm ERR! Linux 4.13.5-coreos-r2
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "unit-coverage"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! dsm-api@1.0.0 unit-coverage:
nyc --reporter=lcovonly npm run unit-test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dsm-api@1.0.0 unit-coverage script 'nyc --reporter=lcovonly npm run unit-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 dsm-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! nyc --reporter=lcovonly npm run unit-test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dsm-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls dsm-api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/atlassian/pipelines/agent/build/npm-debug.log
The text was updated successfully, but these errors were encountered: