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.

Plugin provided an invalid property of "default"

See original GitHub issue

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...

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
kt3kcommented, 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.

0reactions
yvelecommented, Sep 5, 2016

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

error: 'Plugin 0 provided an invalid property of "default"' when ...
Create a new react-native app: react-native init test --template typescript; Setup typescript support : cd test && node setup.js; getstorybook ...
Read more >
bundling failed: Error: Plugin 0 provided an invalid property of ...
This is bug in babel-preset-react-native. Set the version: yarn remove babel-preset-react-native yarn add babel-preset-react-native@2.1.0.
Read more >
bundling failed: Error: Plugin 0 provided an invalid property of ...
Coding example for the question bundling failed: Error: Plugin 0 provided an invalid property of "default"-React Native.
Read more >
Android – bundling failed: Error: Plugin 0 provided an invalid ...
I'm trying to run a react native app on my AVD using this command : react-native run-android. but getting the following error:
Read more >
Upgrade to Babel 7
Presets enable Babel to parse types provided by Flow / TypeScript (and other ... v7 default behavior: ["@babel/plugin-proposal-class-properties"] var Bork ...
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