Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module build failed after upgraded to v6 with "_document.js" #4291

Closed
1 task done
wellyshen opened this issue May 7, 2018 · 3 comments
Closed
1 task done

Module build failed after upgraded to v6 with "_document.js" #4291

wellyshen opened this issue May 7, 2018 · 3 comments

Comments

@wellyshen
Copy link

wellyshen commented May 7, 2018

I'm trying to upgrade from v5 to v6. And I encountered a build error which caused from the _document.js as the following screenshot. Once I remove the _document.js the error was gone. In additional even that I used the example the error still occurs.

2018-05-07 5 37 10

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

  • Upgraded to v6 and build success with _document.js.

Current Behavior

  • Upgraded to v6 but build failed with _document.js.

Steps to Reproduce (for bugs)

  1. Upgraded to v6 via this instruction.
  2. Run yarn dev and build success.
  3. But build failed due to Module build failed: ReferenceError: Unknown helper getPrototypeOf which caused from _document.js.

Your Environment

Tech Version
next v6
node v9.11.1
OS MacOS
browser Google Chrome
@wellyshen wellyshen changed the title Module build failed: ReferenceError: Unknown helper getPrototypeOf Module build failed after upgraded to v6 with _document.js May 7, 2018
@wellyshen wellyshen changed the title Module build failed after upgraded to v6 with _document.js Module build failed after upgraded to v6 with "_document.js" May 7, 2018
@timneutkens
Copy link
Member

It's impossible to reproduce without any code samples. Please provide a full reproduction repository 👍

@srascar
Copy link

srascar commented Jun 19, 2018

@wellyshen , you might be missing some of the babel plugins.
can you try to add ?

"plugins": [
      "@babel/plugin-transform-runtime"
    ]

Hope it will help

@zspencer
Copy link

zspencer commented Sep 5, 2018

Thanks @srascar, adding that resolved the build failure.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants