Skip to content

Plugin fails with ember-cli 2.13 and useBabelInstrumenter: true #111

@paulcwatts

Description

@paulcwatts

I assume this is known, but for tracking purposes:

$ ember -v
ember-cli: 2.13.0-beta.4
node: 6.10.1
os: darwin x64
$ ember new coverage-test
$ cd coverage-test
$ ember install ember-cli-code-coverage
$ COVERAGE=true ember test
...
1..8
# tests 8
# pass  8
# skip  0
# fail  0

# ok
$ echo "module.exports = { useBabelInstrumenter: true };" > config/coverage.js
$ COVERAGE=true ember test
 TypeError: The plugin [null,{}] didn't export a Plugin instance
    at PluginManager.validate (coverage-test/node_modules/babel-core/lib/transformation/file/plugin-manager.js:164:13)
    at PluginManager.add (coverage-test/node_modules/babel-core/lib/transformation/file/plugin-manager.js:213:10)
    at File.buildTransformers (coverage-test/node_modules/babel-core/lib/transformation/file/index.js:237:21)
    at new File (coverage-test/node_modules/babel-core/lib/transformation/file/index.js:139:10)
    at Pipeline.transform (coverage-test/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at Instrumenter.instrumentSync (coverage-test/node_modules/ember-cli-code-coverage/lib/babel-istanbul-instrumenter.js:36:45)
    at CoverageInstrumenter.processString (coverage-test/node_modules/ember-cli-code-coverage/lib/coverage-instrumenter.js:113:25)
    at CoverageInstrumenter.processFile (coverage-test/node_modules/broccoli-filter/index.js:165:31)
    at asyncProcessFile (coverage-test/node_modules/broccoli-filter/index.js:122:21)
    at tryCatch (coverage-test/node_modules/rsvp/dist/rsvp.js:539:12)
Unable to cover: app/resolver.js . Try setting useBabelInstrumenter to true. 
 TypeError: The plugin [null,{}] didn't export a Plugin instance
    at PluginManager.validate (coverage-test/node_modules/babel-core/lib/transformation/file/plugin-manager.js:164:13)
    at PluginManager.add (coverage-test/node_modules/babel-core/lib/transformation/file/plugin-manager.js:213:10)
    at File.buildTransformers (coverage-test/node_modules/babel-core/lib/transformation/file/index.js:237:21)
    at new File (coverage-test/node_modules/babel-core/lib/transformation/file/index.js:139:10)
    at Pipeline.transform (coverage-test/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at Instrumenter.instrumentSync (coverage-test/node_modules/ember-cli-code-coverage/lib/babel-istanbul-instrumenter.js:36:45)
    at CoverageInstrumenter.processString (coverage-test/node_modules/ember-cli-code-coverage/lib/coverage-instrumenter.js:113:25)
    at CoverageInstrumenter.processFile (coverage-test/node_modules/broccoli-filter/index.js:165:31)
    at asyncProcessFile (coverage-test/node_modules/broccoli-filter/index.js:122:21)
    at tryCatch (coverage-test/node_modules/rsvp/dist/rsvp.js:539:12)
...

I'm pretty green with Babel and Babel plugins, but if pointed in the right direction I can take a look at making this work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions