Nationalism is illiberalism
Nationalism means illiberal anti-democratic politics.
Anarchists and hardcore libertarians reject all states as tools of coercion that limit individual liberty. Nations are just another form of the state.
All states are coercive and anti-democratic even if they claim to be democracies. Anything that is imposed on someone that they haven't personally agreed to is an infringement on their liberty. Most people never vote or consent to the vast majority of laws they are subject to. If they try to object they face state coercion in the form of the police, prison, or even the army. As nations are just another form of state they are inherently coercive.
As citizens of a nation people have not only rights but also obligations to other citizens. These obligations are administered by the state e.g. paying taxes to maintain common goods like roads, hospitals, etc... Even if you disagree with some laws you have a duty to obey them as you benefit from the system as a whole. So long as you participate in and benefit from the system you are giving passive consent to be governed. In proper democracies, people do give consent to their government and its laws by voting and choosing who will make and administer the laws. Even if people don't vote, they give consent passively by living within the society and enjoying its many advantages.
[P1] Anything imposed on someone they didn't actively agree to is coercive. [P2] All states imposed laws on citizens they never personally agreed to. [P3] Therefore all states are coercive. [P4] All nations are states.
[P1] People have duties towards the state as well as rights. [P2] People do consent, either passively or actively, to the laws of society in democracies
Content references here ...