Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Really long production build time of Next.js app on Ubuntu 20.04
Next.js applications with typescript have really long production build time. Simple app with just one page needs 5 minutes to build and other much bigger app can’t even finish the build process.
This happens only on my Ubuntu Server on Digital Ocean, the same apps on my Windows system build x10 faster and there isn’t any problem. The build process also uses 100% CPU of the server.
You can try to clone my simple next.js typescript app:
And try to build it. It takes around 3-5mins to build or sometimes never finish while locally on my Windows it is built in 20 sec.
Ubuntu 20.04, Digital Ocean basic droplet
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×