Getting above error with below configuration, commenting passPerPreset removes the error however. Is there any configuration missing ?
.babelrc :
{
"passPerPreset": true,
"presets": [{
"plugins": [
"./build/babelRelayPlugin",
"transform-runtime",
"transform-es2015-classes"
]
}, "es2015", "stage-0", "react"],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
package.json :
"babel-cli": "^6.5.1",
"babel-core": "^6.5.2",
"babel-eslint": "^4.1.8",
"babel-loader": "^6.2.2",
"babel-plugin-react-transform": "^2.0.0",
"babel-plugin-transform-es2015-classes": "^6.5.2",
"babel-plugin-transform-runtime": "^6.5.2",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.0",
"babel-preset-stage-0": "^6.5.0",
"babel-relay-plugin": "^0.7.0",
"babel-runtime": "^6.5.0",
Webpack :
module: {
loaders: [
{
loader: "babel-loader",
include: [
path.resolve(__dirname, "app"),
],
test: /\.jsx?$/,
query: {
plugins: ['transform-runtime'],
presets: ['react', 'es2015', 'stage-0'],
}
},
]
},
Error : babel-node start
Module build failed: Error: Plugin 0 specified in "/Users/my/demo/node_modules/babel-preset-es2015/index.js" provided an invalid property of "_c"
What worked for me was:
rm -rf node_modules
npm prune
npm cache clear
npm cache clean
npm i
Upgrading babel-core
and babel-loader
fixed this for me.
npm install --save babel-core@latest babel-loader@latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With