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

Bumping project to 9.5.5 causes build errors #18056

Closed
vallode opened this issue Oct 20, 2020 · 11 comments · Fixed by #20063
Closed

Bumping project to 9.5.5 causes build errors #18056

vallode opened this issue Oct 20, 2020 · 11 comments · Fixed by #20063
Assignees
Labels
Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Milestone

Comments

@vallode
Copy link

vallode commented Oct 20, 2020

Bug report

Describe the bug

Upgrading to 9.5.5 causes Failed to compile error when running next build

static/chunks/228a2a7ba78e3ffd319f6ce5014dd859657e6b72.6c045b2e351579d8c08d.js from Terser
TypeError: e.computed_key is not a function
    at Array.some (<anonymous>)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Upgrade to next@9.5.5 via yarn add next@9.5.5
  2. Run next build
  3. See error

Expected behavior

The build to succeed as it has with previous versions.

System information

  • OS: Debian 10
  • Browser (if applies) [e.g. chrome, safari]
  • Version of Next.js: 9.5.5
  • Version of Node.js: 14.14.0

Additional context

The exact point at which our builds fail is upgrading to 9.5.4. Builds previous to that work.
Any pointers to debugging this issue would be appreciated.

@ljosberinn
Copy link
Contributor

ljosberinn commented Oct 21, 2020

Needs reproduction. Could you either provide a minimum reproduction repository and the full stack trace?

@timneutkens timneutkens added the please add a complete reproduction The issue lacks information for further investigation label Oct 21, 2020
@vallode
Copy link
Author

vallode commented Oct 26, 2020

@ljosberinn I'm struggling to find more information to provide, have tried replicating in a fresh repo but also stuck on a dead end.

> yarn build
yarn run v1.22.5
$ next build
info  - Using external babel configuration from .babelrc
info  - Creating an optimized production build  
Failed to compile.

static/chunks/fbec03aea3240f37bda883c7f88c843c999b7f14.3ae2ff6682538183588c.js from Terser
TypeError: e.computed_key is not a function
    at Array.some (<anonymous>)


> Build error occurred
Error: > Build failed because of webpack errors
    at build (node_modules/next/dist/build/index.js:15:918)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I will try to git bisect the repo using 9.5.5 in hopes of finding a place where it does work, potentially the issue can be identified that way. If you have any ideas, let me know.

@vallode
Copy link
Author

vallode commented Dec 8, 2020

I'm continuing to face this issue with Next 10, would really appreciate any lead towards debugging this as I have no idea where to look.

@ljosberinn
Copy link
Contributor

A minimum reproduction repository would probably be faster than an async remote debugging session :)

@vallode
Copy link
Author

vallode commented Dec 10, 2020

A minimum reproduction repository would probably be faster than an async remote debugging session :)

I most certainly understand this but I don't even know where to start with creating a minimal reproduction. As you can see the error message and stack trace are next to useless (at least in my eyes), which doesn't help the situation.

I'll be trying more but this is an arduous process, trying to locate where this actually fails. Potentially since I know the fail is somewhere between 9.5.2 and 9.5.3 I can checkout the commits one by one and see when it starts failing.

@vallode
Copy link
Author

vallode commented Dec 10, 2020

9.5.3-canary.7 - Fail
9.5.3-canary.4 - Fail
9.5.3-canary.3 - Success
9.5.3-canary.2 - Success

https://github.com/vercel/next.js/releases/tag/v9.5.3-canary.4
Seems like canary 4 was the breaking point for us, looking at the error message Terser 5 upgrade seems to be the culprit.

EDIT: I thought that perhaps our version of Webpack was out of date, after updating all webpack-related packages the issue remains.

@vallode
Copy link
Author

vallode commented Dec 10, 2020

terser/terser#805
Could this issue be potentially related? I removed any/all instances of ...{} deconstruction but seem to still be facing it, so unsure there.

@Timer Timer added kind: bug Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.). and removed please add a complete reproduction The issue lacks information for further investigation labels Dec 10, 2020
@Timer Timer self-assigned this Dec 10, 2020
Timer added a commit to Timer/next.js that referenced this issue Dec 10, 2020
@Timer Timer mentioned this issue Dec 10, 2020
@vallode
Copy link
Author

vallode commented Dec 10, 2020

Apologies for not providing adequate info initially, was difficult to debug this! Thanks for your help @Timer @ljosberinn :)

@kodiakhq kodiakhq bot closed this as completed in #20063 Dec 10, 2020
kodiakhq bot pushed a commit that referenced this issue Dec 10, 2020
@Timer Timer added this to the iteration 14 milestone Dec 10, 2020
@Timer
Copy link
Member

Timer commented Dec 10, 2020

Please try 10.0.4-canary.4 and let us know!

@vallode
Copy link
Author

vallode commented Dec 10, 2020

Confirmed 10.0.4-canary.4 fixes the issue on my end!

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants