Skip to content
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

Plugin provided an invalid property of "default" #1

Open
zaggino opened this issue Dec 18, 2015 · 5 comments
Open

Plugin provided an invalid property of "default" #1

zaggino opened this issue Dec 18, 2015 · 5 comments

Comments

@zaggino
Copy link

zaggino commented Dec 18, 2015

Tried using the plugin here: https://github.com/pureprofile-warp/babel-preset-pp-node4/blob/master/index.js but on start I get an error:

C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\plugin.js:125
      throw new Error(messages.get("pluginInvalidProperty", loc, i, key));
      ^

Error: Plugin 0 specified in "C:\\dev\\pureprofile\\ah-api-web\\node_modules\\babel-preset-pp-node4\\index.js" provided an invalid property of "default"
    at Plugin.init (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\plugin.js:125:13)
    at Function.normalisePlugin (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:167:12)
    at C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:197:30
    at Array.map (native)
    at Function.normalisePlugins (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:173:20)
    at OptionManager.mergeOptions (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:271:36)
    at OptionManager.mergePresets (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:325:16)
    at OptionManager.mergeOptions (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:287:12)
    at OptionManager.addConfig (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:221:10)
    at OptionManager.findConfigs (C:\dev\pureprofile\ah-api-web\node_modules\babel-core\lib\transformation\file\options\option-manager.js:364:16)
[nodemon] app crashed - waiting for file changes before starting...
@loganfsmyth
Copy link
Owner

Sorry, did you ever figure out the cause of this? As long as you are on a recent version of Babel, I wouldn't expect this behavior.

@kt3k
Copy link

kt3k commented Jan 17, 2016

Because this plugin exports only exports.default and doesn't export module.exports, maybe you need to put require("babel-plugin-transform-builtin-extend").default instead of require("babel-plugin-transform-builtin-extend").

I saw a similar error when I was creating this preset.
Babel's official transforms still export both module.exports and module.exports.default and that's why you don't need to put .default after require(...) when requiring them.

@zaggino
Copy link
Author

zaggino commented Jan 19, 2016

@kt3k
Copy link

kt3k commented Jan 19, 2016

😄 👍

@yvele
Copy link

yvele commented Sep 5, 2016

@kt3k I ran in the same issue, thank you so much for the .defaultworkarround 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants