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: https://github.com/Ptak-Warsaw-Expo/test-expoplus 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 Next.js: 9.5.3 Node.js: 14.10.1
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello! I have the same issue, but my builder runs from docker-container. It can’t even finish, just exit with:
ERROR: Service 'front' failed to build: The command '/bin/sh -c yarn build' returned a non-zero code: 1
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.