question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when adding babel-plugin-transform-flow-strip-types

See original GitHub issue

I’m trying to integrate ember with Flow Type Checker, but getting an error during ember builds:

File: ember-ajax/ajax-request.js
The Broccoli Plugin: [Babel] failed with:
TypeError: The plugin "transform-flow-strip-types" didn't export a Plugin instance
//ember-cli-build.js
module.exports = function(defaults) {
  var app = new EmberAddon(defaults, {
    babel: {
      plugins: ["transform-flow-strip-types"]
    }
  });

The error seems to originate from .../node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/file/plugin-manager.js:165:13)

    // validate Transformer instance
    if (!plugin.buildPass || plugin.constructor.name !== "Plugin") {
      throw new TypeError(messages.get("pluginNotTransformer", name));
    }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonmitcommented, Nov 8, 2016

transform-flow-strip-types is a babel 6 plugin. ember-cli-babel currently targets babel 5.

0reactions
Turbo87commented, Dec 5, 2016

you can track the Babel 6 progress in #62. closing this as a duplicate for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question - Stack Overflow
could anyone tell me how to add the plugin inside babel.config.js?or is there any other way to resolve the above error? Any suggestions...
Read more >
@babel/plugin-transform-flow-strip-types - npm
Start using @babel/plugin-transform-flow-strip-types in your project by running `npm i @babel/plugin-transform-flow-strip-types`.
Read more >
babel/plugin-transform-flow-strip-types
npm install --save-dev @babel/plugin-transform-flow-strip-types ... It will also throw errors for any Flow annotations found in files without the directive.
Read more >
[Solved]-how to Add @babel/plugin-transform-flow-strip-types ...
Coding example for the question how to Add @babel/plugin-transform-flow-strip-types (https://git.io/vb49g) to the 'plugins' section of your Babel config to ...
Read more >
Errors encountered upgrading Flow v0.85 - Tan Li Hau
There was another interesting bug that we ran into regarding @babel/plugin-transform-flow-strip-types, you can read more on how we uncover ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found