Captain Shatner wrote:
WHY CAN'T THE CREW USE THE REPLICATOR TO MAKE DILITHIUM CRYSTALS
They didn't exist until 2364.
It's been stated several times that Dilithium cannot be replicated, only mined, as of the 2380's novelverse this is still the case.
Replicating something so complex would take hours, even one or two days.