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

Next Build fails with start <= end assertion failed #65436

Closed
rishabh3112 opened this issue May 7, 2024 · 3 comments · Fixed by #65602
Closed

Next Build fails with start <= end assertion failed #65436

rishabh3112 opened this issue May 7, 2024 · 3 comments · Fixed by #65602
Labels
bug Issue was opened via the bug report template. SWC Related to minification/transpilation in Next.js. Webpack Related to Webpack with Next.js.

Comments

@rishabh3112
Copy link

Link to the code that reproduces this issue

https://github.com/rishabh3112/next-bug-large-repo

To Reproduce

  1. Clone repo: https://github.com/rishabh3112/next-bug-large-repo
  2. npm install
  3. npm run build

Current vs. Expected behavior

At my company, We have a fairly large monorepo and it uses next 14 with swc minification, plugins and transforms enabled. Recently our build has started to fail with following:

thread '<unnamed>' panicked at <HOME_DIR>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_common-0.33.9/src/input.rs:31:9:
assertion failed: start <= end
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behaviour would be for build to not fail for our codebase.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 21.6.0: Sun Dec 17 22:57:33 PST 2023; root:xnu-8020.240.18.706.2~1/RELEASE_ARM64_T6000
Binaries:
  Node: 18.17.1
  npm: 9.6.7
  Yarn: 3.2.4
  pnpm: N/A
Relevant Packages:
  next: 14.0.4 (reproducable in latest 14.2.3 and canary)
  eslint-config-next: 14.0.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 4.9.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

SWC, Webpack

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

We have investigated the issue and found out the cause for this.
Please check them ( hope you find them helpful ): https://github.com/rishabh3112/next-bug-large-repo?tab=readme-ov-file#investigations

I am willing to contribute / discuss issue in more detail if needed.

@rishabh3112 rishabh3112 added the bug Issue was opened via the bug report template. label May 7, 2024
@github-actions github-actions bot added SWC Related to minification/transpilation in Next.js. Webpack Related to Webpack with Next.js. labels May 7, 2024
@icyJoseph
Copy link
Contributor

Should this be taken to SWC then? https://github.com/swc-project/swc/issues the maintainer these is very effective 🎉

@rishabh3112
Copy link
Author

@icyJoseph Thanks for suggestion, will raise this with swc as well. Although I think issue is from both nextjs side (i.e. next-swc) and from swc side.

@rishabh3112
Copy link
Author

rishabh3112 commented May 7, 2024

Raised the same at swc here: swc-project/swc#8932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. SWC Related to minification/transpilation in Next.js. Webpack Related to Webpack with Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants