question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build error next.js 6.0.0

See original GitHub issue

I just upgraded to next@6.0.0, I use a custom server, when I try to run dev, I get an error.

npm run dev

> frontend-next@1.0.0 dev /Users/foo/gitlab/next-project/backend
> babel-node ./src/server.js

/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
        throw e;
        ^

Error: Plugin 0 specified in "/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js")
    at Plugin.init (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/plugin.js:131:13)
    at Function.normalisePlugin (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
    at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
    at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend-next@1.0.0 dev: `babel-node ./src/server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the frontend-next@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/foo/.npm/_logs/2018-04-30T08_41_09_819Z-debug.log

UPDATE all this passed after upgrading all babel packages to v7

Now this is the new error… See below for complete error message

ERROR  Failed to compile with 1 errors                                                                                                                                                                                               10:32:07

 error  in ./pages/_document.js

Module build failed: Error: [BABEL] /Users/foo/gitlab/zyombo/backend/pages/_document.js: .value is not a valid Plugin property

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:24
  • Comments:125 (27 by maintainers)

github_iconTop GitHub Comments

73reactions
darthchudicommented, Apr 30, 2018

I have this exact same issue with Babel and Next.

29reactions
timneutkenscommented, May 1, 2018

@GabrielDuarteM to fix babel-jest install: "babel-core": "7.0.0-bridge.0"

Read more comments on GitHub >

github_iconTop Results From Across the Web

module-not-found - Next.js
The module you're trying to import is in a different directory. Make sure that the path you're importing refers to the right directory...
Read more >
Next.js error cannot find module 'next/headers' - Stack Overflow
In your case using version 12 yet, the root cause is that in v4.12.x with next/headers package from next@12, maybe it is to...
Read more >
Re: Build Error - Cannot Build App using Next Js
I was using ngroks and worked fine. But when I tried to move that to live server and using the command npm run...
Read more >
Next.js Preview using @prismicio/client@^6.0.0 - Prismic People
I hit preview, it opens my localhost, it goes to the page, it shows the loader, then it seems to refresh and error....
Read more >
How to host Next.js app on .NET 6.0 application
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found