Closed mathur619 closed 3 months ago
Hi,
Nothing changed in the past 2 weeks and as you can see this project don't have any direct dependencies, only peer dependencies.
Did you change anything in your build system, react or antd versions?
Hey, thanks for replying!
No, we changed nothing. In fact, you can see I created a new project and that was also taking a lot of time.
Hum, but I guess new project always use latest antd version.
100% sure it's related to an update on a dependency. Since this lib didn't change any line of code + don't have any dependencies, I don't see any other option.
Can you try with different antd version?
It's either:
New project with new version of all that will have the problem. If you can find with what dependency version it's slower, then we can pinpoint the problem in this lib. I guess a new version don't really something from this lib.
Describe the bug Nextjs build taking too long or getting stuck suddenly
Since 6th May (we noticed the issue on this date), our nextjs project build is taking about 28 mins (before it was 8 mins) No changes were made by our team, this happened out of nowhere. When I started debugging, I tried every possible thing:
Nothing worked!
Then I started to comment out the pages to see what the issue is. As I did this, I found out that the problem was in "Cron" imported from 'react-js-cron'. As I removed the component, the build worked like before.
I also went and searched for the issue on the internet and stumbled upon this stack overflow question. Putting the link of a specific answer that involves Ant Design: https://stackoverflow.com/a/78431128
We are not using the app router in nextjs, but our nextjs version is 13.4.2.
The last fast build was on: April 23, 2024 at 1:08:38 PM GMT+5:30, this took 8 mins After that we built our code on: May 6, 2024 at 11:06:26 AM GMT+5:30, this took 28 mins
To be extra sure, I created a new project with nextjs 13.5, and just installed this one package and used it. Same output, the build is taking too long or getting stuck.
Just to compare, in my local when I build my own project, it takes - 100secs, and when we build it for the production it takes about 8 mins as other things are also running like installing the packages and all.
For a new project without react-cron-js, in my local, it takes 9 sec to build, and, with react-cron-js, it takes 600 secs.
I am not able to figure out what happened. Was there any update in the library in this time period, in last 2 weeks? Or has something changed in the ant design?
Any help would be appreciated!
To Reproduce Steps to reproduce the behavior:
Attaching the repo of the new project that I created to test the build. I used npm to install and build.
https://github.com/mathur619/nextjs-react-js-cron-issue
Expected behavior Build should be faster or we can say, should not get stuck when using react-js-cron.
Screenshots
If applicable, add screenshots to help explain your problem.
These set of screenshots are for my production build:
These set of screenshots are for my local build with the brand new project:
CodeSandbox Providing the github repo with react-js-cron installed in nextjs project. https://github.com/mathur619/nextjs-react-js-cron-issue
Versions (please complete the following information):
Additional context Add any other context about the problem here.