The problem is liability to pay tax in the country you’re based in. It varies per country, but you and/or your employer will be liable to pay income tax if you reside more than x days there. You also might be required to fill in a tax return in that country. You will also need to consider your employer’s obligations under local labour laws with respect to pension, minimum wage, holiday entitlement and healthcare.