Next v6.0.0 babel plugin provided an invalid property of "default"
See original GitHub issueEver since upgrading to Next 6 and trying to take advantage of the new _app.js file, I seem to have issues with having a .babelrc
file. If I remove the .babelrc
file everything works fine except for my mocha tests.
But keeping the file:
{
"presets": [
"es2015",
"next/babel",
"stage-2"
]
}
I get the following error:
Error: Plugin 0 specified in "/Users/dillonraphael/Desktop/REED/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/Users/dillonraphael/Desktop/REED/node_modules/next/babel.js")
This is my package.json:
"scripts": {
"dev": "nodemon -w ./server --exec babel-node ./server/server.js --presets=es2015,stage-2",
"build": "next build",
"start": "next start",
"test": "mocha --require babel-core/register --exit"
},
"dependencies": {
"@zeit/next-sass": "^0.1.2",
"dotenv": "^5.0.1",
"express": "^4.16.2",
"mongoose": "^5.0.8",
"next": "^5.1.0",
"next-images": "^0.10.1",
"node-sass": "^4.9.0",
"react": "16.2.0",
"react-dom": "16.2.0",
"renaissancecss": "^3.0.0"
},
"license": "ISC",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"chai": "^4.1.2",
"chai-http": "^3.0.0",
"mocha": "^5.0.4",
"nodemon": "^1.17.1"
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
bundling failed: Error: Plugin 0 provided an invalid property ...
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 >@babel/plugin-transform-runtime | Yarn - Package Manager
The compiler for writing next generation JavaScript. Gitpod ready-to-code.
Read more >Babel issue running npm run dev after upgrade to Mix
I have an old Laravel App which I updated to Laravel 5.8. I removed all old resources files, package-lock.json, yarn.lock and gulp files....
Read more >Releases
v6.0.0-alpha.5. Fix types associated with styled-components/macros; Add optional peer dependency for babel-plugin-styled-components (required for macros).
Read more >Upgrade to Babel 7
Separation of the React and Flow presets ... babel-preset-react has always included the flow plugin. This has caused a lot of issues with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Earlier this week I was was running into the same issue trying to get jest up and running, mocha ran into the same problem. Got back to it today and just doing a copy/paste of the “with-jest” example babelrc and package.json’s relevant dev dependencies worked for me, which is odd because thats the first thing I tried earlier this week but I got this error.
@maniart Check out http://babeljs.io/env