To express that something specific is lacking, that something is not working properly, or that something presents a difficulty. The verb is used almost exclusively impersonally with 'es' (it).
example
Bei der Organisation hapert es noch an allen Ecken und Enden.
In terms of organization, things are still lacking in every possible way.
Usage tips
Impersonal verb
'Hapern' (to be lacking/to be a problem) is an impersonal verb and is almost always used with 'es' (it) as the subject. So you say 'es hapert' (there is a problem / something is lacking), not 'ich hapere' or 'das Projekt hapert'.
EXAMPLE
Es hapert noch bei der Planung für das Fest.
There are still problems with the planning for the festival.
Fixed preposition
The verb is used with the fixed preposition 'an' and the dative. The structure is: 'Es hapert an' + dative. This expresses where exactly the problem lies or what is missing.
EXAMPLE
Beim neuen Computer hapert es an der Software.
With the new computer, the problem is the software.
Questions and subordinate clauses
When asking about the problem or naming it in a subordinate clause, you use the question word 'woran' (what ... with / where the problem lies). The word order in the subordinate clause remains the same.
EXAMPLE
Woran hapert es denn?
What exactly is the problem?
Compare with
antonym
hapern vs funktionieren
to work
'funktionieren' and 'hapern' describe opposite situations. When something 'funktioniert', it works properly, or a plan succeeds as intended. When 'es an etwas hapert', there is a problem there, or something important is missing. You can use 'funktionieren' with devices, plans, or cooperation. 'hapern' is usually used impersonally with 'es', for example: 'Es hapert an der Zeit' (there is not enough time) or 'Es hapert bei der Planung' (there are problems with the planning). So the difference is: with 'funktionieren', something is going well; with 'hapern', something is not going properly.
hapern
Bei dem Projekt hapert es noch an einer klaren Planung.
The project still lacks clear planning.
funktionieren
Nach der Reparatur funktioniert der Drucker im Büro wieder.
After the repair, the office printer is working again.