Skip to content

Next v6.0.0 babel plugin provided an invalid property of "default" #4300

@itsdillon

Description

@itsdillon

Ever 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"
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions