Skip to content

Category

software development

Practical software engineering from a team lead: clean code, SOLID, refactoring, debugging, backend design and system architecture with Laravel and React.

Four steps to fix Next.js window is not defined: read the first stack frame to see whether the component or module evaluation failed, move browser code used in render into useEffect, load libraries that read window on import with next/dynamic and ssr false, then verify with a hard refresh and next build

10/22/2026

How to Fix Next.js Window Is Not Defined Error

A live vehicle map broke our fleet dashboard build with window is not defined, even though the component was marked use client. Here is why Client Components still render on the server and how I fix each case.

By Muhammad Wilayat Shah

Read
Four steps to fix Docker no space left on device: check which disk is full with df -h and df -i, see what Docker holds with docker system df, free space safely by pruning old images then build cache then truncating logs, and prevent it with log rotation and a weekly prune

10/22/2026

Docker No Space Left on Device: How to Fix It

Our reporting server stopped deploying with no space left on device: months of tagged images and an unrotated worker log. Here is how I find where Docker's disk space went and free it safely.

By Muhammad Wilayat Shah

Read