.default is not a valid Plugin property

See original GitHub issue

Bug Report

Current Behavior When building my electron app with latest babel it will throw the following error:

ERROR in ./src/renderer/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: [BABEL] /Users/rodrigopavezi/selfkey/github/Identity-Wallet/src/renderer/index.js: .default is not a valid Plugin property at Object.keys.forEach.key (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/validation/plugins.js:52:56) at Array.forEach (<anonymous>) at validatePluginObject (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/validation/plugins.js:50:20) at instantiatePlugin (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/full.js:209:55) at cachedFunction (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/caching.js:33:19) at loadPluginDescriptor (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/full.js:200:10) at config.plugins.reduce (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/full.js:69:20) at Array.reduce (<anonymous>) at recurseDescriptors (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/full.js:67:38) at loadFullConfig (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/config/full.js:108:6) at process.nextTick (/Users/rodrigopavezi/selfkey/github/Identity-Wallet/node_modules/@babel/core/lib/transform.js:28:33) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) @ multi (webpack)-dev-server/client?http://localhost:9080 (webpack)/hot/dev-server.js css-hot-loader/hotModuleReplacement ./src/renderer/index.js renderer[3]

Input Code Repo: https://github.com/SelfKeyFoundation/Identity-Wallet

Expected behavior/code It should build the app and run it normally as it working on version 7.0.0-beta.47

Babel Configuration (.babelrc, package.json, cli command)

{
	"presets": [
		[
			"@babel/preset-env",
			{
				"targets": {
					"node": "current"
				}
			}
		],
		"@babel/preset-react"
	],
	"plugins": [
		"@babel/plugin-proposal-class-properties"
	]
}

Environment

  • Babel version(s): [v7.0.0]
  • Node/npm version: [Node 8/yarn 1.9.4]
  • OS: [OSX]
  • How you are using Babel: [loader]

Cheers

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
loganfsmythcommented, Aug 28, 2018

Alright, looks like this is something electron-webpack would have to fix in. On https://github.com/electron-userland/electron-webpack/blob/504b8f64eca28437ec78b334f9f9f2e245a6b0e1/packages/electron-webpack/src/configurators/js.ts#L14 it should have a .default after the require()

0reactions
JLHwungcommented, Jun 30, 2020

Closing as the downstream issue has been fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BABEL .default is not a valid Plugin property at Object.keys ...
plugins : [require('@babel/plugin-proposal-class-properties').default]. otherwise Babel will not be able to process it properly when ...
Read more >
BABEL .default is not a valid Plugin property at Object.keys ...
Coding example for the question BABEL .default is not a valid Plugin property at Object.keys.forEach.key-babel.js.
Read more >
babel/plugin-transform-modules-commonjs
When using exports with babel a non-enumerable __esModule property is exported. This property is then used to determine if the import is the...
Read more >
eslint/eslint - Gitter
I have configured eslint in my application with eslint-config-react-app ... During build time I'm getting below error... .default is not a valid Plugin...
Read more >
react-native-dotenv - npm
This babel plugin lets you inject your environment variables into your ... configuration and their respective default values, but you do not ......
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