I've updated Next from version 5 to 6 and on build I get:
Error: .plugins[4][1] must be an object, false, or undefined
at assertPluginItem (/node_modules/@babel/core/lib/config/validation/option-assertions.js:157:15)
at /node_modules/@babel/core/lib/config/validation/option-assertions.js:134:14
at Array.forEach (<anonymous>)
at assertPluginList (/node_modules/@babel/core/lib/config/validation/option-assertions.js:133:9)
at /node_modules/@babel/core/lib/config/validation/options.js:84:20
at Array.forEach (<anonymous>)
at validate (/node_modules/@babel/core/lib/config/validation/options.js:62:21)
at /node_modules/@babel/core/lib/config/config-chain.js:141:36
at cachedFunction (/node_modules/@babel/core/lib/config/caching.js:40:17)
at init (/node_modules/@babel/core/lib/config/config-chain.js:122:12)
at /node_modules/@babel/core/lib/config/config-chain.js:206:17
at buildRootChain (/node_modules/@babel/core/lib/config/config-chain.js:85:20)
at loadPrivatePartialConfig (/node_modules/@babel/core/lib/config/partial.js:41:53)
at loadPartialConfig (/node_modules/@babel/core/lib/config/partial.js:66:16)
at babelConfig (/node_modules/next/dist/server/build/webpack.js:88:57)
at _callee2$ (/node_modules/next/dist/server/build/webpack.js:164:34)
My babel deps are:
"babel-eslint": "^8.2.3",
"babel-plugin-inline-react-svg": "^0.5.2",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-env": "^1.6.1",
"babel-root-import": "^4.1.8",
"markdown-in-js": "1.1.4",
.babelrc
{
"presets": [
"env",
"next/babel"
],
"plugins": [
"markdown-in-js/babel",
"inline-react-svg",
"transform-decorators-legacy",
"transform-class-properties",
["babel-root-import", [{
"rootPathPrefix": "~",
"rootPathSuffix": "."
}, {
"rootPathPrefix": "$",
"rootPathSuffix": "app"
}, {
"rootPathPrefix": "#",
"rootPathSuffix": "shared"
}]]
]
}
| Tech | Version |
|---------|---------|
| next | 6 |
| node | v8.9.3 |
| OS | macOS H.S. |
Duplicate of https://github.com/zeit/next.js/issues/4227
did this issue resolved?
@forMine not yet, I'm still running next 5
I updated to next 7 and the babel deps using babel-upgrade, the app is building and running correctly locally (also in docker container, using nanobox), but when deployed (same environment) I get the usual error:
Module build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):
Error: .plugins[0][1] must be an object, false, or undefined
This is my new babel.config.js:
module.exports = {
presets: [
'next/babel',
],
plugins: [
'markdown-in-js/babel',
'inline-react-svg',
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
],
};
I'm not using all the plugins installed by babel-upgrade. Just what I need.
the packages installed by babel-upgrade in devDependencies are:
"@babel/core": "^7.1.2",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"babel-plugin-inline-react-svg": "^0.5.4",
really can't understand what's still wrong!
This error is still preventing me to update next.
I also reduced the number of the plugins used in the babel config file.
@foxhound87 did babel-upgrade install babel-core": "^7.0.0-bridge.0? I don't see it in your list, and I'm pretty sure it's absence will muck with the non-scoped packages (e.g. babel-eslint)
this is the error, thrown only on nanobox (remote) environment (locally is working):
[3:04:02 PM] Compiling server
[3:04:02 PM] Compiling client
[3:04:03 PM] Compiled server in 758ms
[3:04:11 PM] Compiled client in 8s
> Failed to build
{ Error: (client) ./pages/_app.js
Module build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):
Error: .plugins[0][1] must be an object, false, or undefined
at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)
at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)
at Array.forEach (<anonymous>)
at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)
at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)
at Array.forEach (<anonymous>)
at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)
at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)
at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)
at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)
at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)
at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)
at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)
at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)
at Generator.next (<anonymous>)
at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)
@ multi ./pages/_app.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/_app.js[0]
at /app/node_modules/next/dist/build/index.js:144:31
at finalCallback (/app/node_modules/webpack/lib/MultiCompiler.js:247:12)
at runWithDependencies.err (/app/node_modules/webpack/lib/MultiCompiler.js:270:6)
at done (/app/node_modules/neo-async/async.js:2928:13)
at runCompilers (/app/node_modules/webpack/lib/MultiCompiler.js:174:48)
at err (/app/node_modules/webpack/lib/MultiCompiler.js:181:7)
at compiler.run (/app/node_modules/webpack/lib/MultiCompiler.js:263:7)
at finalCallback (/app/node_modules/webpack/lib/Compiler.js:204:39)
at hooks.done.callAsync.err (/app/node_modules/webpack/lib/Compiler.js:220:13)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:33:1)
at AsyncSeriesHook.lazyCompileHook (/app/node_modules/tapable/lib/Hook.js:154:20)
at onCompiled (/app/node_modules/webpack/lib/Compiler.js:218:21)
at hooks.afterCompile.callAsync.err (/app/node_modules/webpack/lib/Compiler.js:547:14)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
at AsyncSeriesHook.lazyCompileHook (/app/node_modules/tapable/lib/Hook.js:154:20)
at compilation.seal.err (/app/node_modules/webpack/lib/Compiler.js:544:30)
errors:
[ [32m'(client) ./pages/_app.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/_app.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/_app.js[0]'[39m,
[32m'(client) ./pages/cookie-policy.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/cookie-policy.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/cookie-policy.js[0]'[39m,
[32m'(client) ./pages/educational.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/educational.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/educational.js[0]'[39m,
[32m'(client) ./pages/index.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/index.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/index.js[0]'[39m,
[32m'(client) ./pages/press.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/press.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/press.js[0]'[39m,
[32m'(client) ./pages/privacy-policy.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/privacy-policy.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/privacy-policy.js[0]'[39m,
[32m'(client) ./pages/solidworks.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/solidworks.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/solidworks.js[0]'[39m,
[32m'(client) ./pages/terms-of-service.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/terms-of-service.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/terms-of-service.js[0]'[39m,
[32m'(server) ./pages/_app.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/_app.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/_app.js[0]'[39m,
[32m'(server) ./pages/_document.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/_document.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/_document.js[0]'[39m,
[32m'(server) ./pages/cookie-policy.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/cookie-policy.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/cookie-policy.js[0]'[39m,
[32m'(server) ./pages/educational.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/educational.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/educational.js[0]'[39m,
[32m'(server) ./pages/index.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/index.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/index.js[0]'[39m,
[32m'(server) ./pages/press.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/press.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/press.js[0]'[39m,
[32m'(server) ./pages/privacy-policy.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/privacy-policy.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/privacy-policy.js[0]'[39m,
[32m'(server) ./pages/solidworks.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/solidworks.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/solidworks.js[0]'[39m,
[32m'(server) ./pages/terms-of-service.js\nModule build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nError: .plugins[0][1] must be an object, false, or undefined\n at assertPluginItem (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:235:15)\n at arr.forEach (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:30)\n at Array.forEach (<anonymous>)\n at assertPluginList (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/option-assertions.js:213:9)\n at Object.keys.forEach.key (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:106:5)\n at Array.forEach (<anonymous>)\n at validateNested (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:82:21)\n at validate (/app/node_modules/next/node_modules/@babel/core/lib/config/validation/options.js:73:10)\n at file (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:169:34)\n at cachedFunction (/app/node_modules/next/node_modules/@babel/core/lib/config/caching.js:33:19)\n at buildRootChain (/app/node_modules/next/node_modules/@babel/core/lib/config/config-chain.js:118:36)\n at loadPrivatePartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:57:55)\n at Object.loadPartialConfig (/app/node_modules/next/node_modules/@babel/core/lib/config/partial.js:82:18)\n at Object.<anonymous> (/app/node_modules/next/node_modules/babel-loader/lib/index.js:105:26)\n at Generator.next (<anonymous>)\n at step (/app/node_modules/next/node_modules/babel-loader/lib/index.js:3:221)\n @ multi ./pages/terms-of-service.js static/R~0HJnEdTJJ9LkPuS9ihU/pages/terms-of-service.js[0]'[39m ],
warnings: [] }
I finally figured it out.
I think this is something about a caching issue with nanobox: after cloning the repo in a new directory the error went away on the remote nanobox container and all is working as expected!
My configuration is OK!
Finally fully enjoying next.js :D
Most helpful comment
I updated to next 7 and the babel deps using
babel-upgrade, the app is building and running correctly locally (also in docker container, using nanobox), but when deployed (same environment) I get the usual error:This is my new
babel.config.js:I'm not using all the plugins installed by
babel-upgrade. Just what I need.the packages installed by
babel-upgradeindevDependenciesare:really can't understand what's still wrong!
This error is still preventing me to update next.
I also reduced the number of the plugins used in the babel config file.