I am using v8.0.4. Everything OK in dev. But after I do next build and run my app the app stuck in server-side, then I get the TypeError: (0 , _typeof2.default) is not a function error. Does anyone has this issue?
yarn installyarn buildyarn startApp can run without TypeError: (0 , _typeof2.default) is not a function error like as dev.

Here's my packages.json :
{
"name": "",
"version": "",
"description": "",
"main": "app/index.js",
"author": "",
"scripts": {
"dev": "nodemon app/server --exec babel-node",
"build": "next build app",
"start": "NODE_ENV=production node app"
},
"babel": {
"presets": [
"@babel/preset-env",
"next/babel"
]
},
"dependencies": {
"@babel/register": "^7.4.0",
"express": "^4.16.4",
"next": "^8.0.4",
"next-routes": "^1.4.2",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"devDependencies": {
"@babel/node": "^7.2.2",
"nodemon": "^1.18.10"
}
}
Please provide a full reproduction, it's impossible to help based on the description provided.
I'm having same issue on 8.0.4. Not sure but i think it looks related to: "next/babel" preset.
Please show us your .babelrc file. I had the same problem and fixed by removing a @babel/preset-env. In the updated documentation it says:
The next/babel preset includes everything needed to transpile React applications. This includes:
preset-env
Good luck!
Most helpful comment
Please show us your .babelrc file. I had the same problem and fixed by removing a @babel/preset-env. In the updated documentation it says:
Good luck!