I read that $\sqrt{x} = -1$ has no solution because after we square both sides we get $x = 1,$ which isn't a correct solution. But doesn't writing $-1$ as $i^2$ give the solution $x = i^4$ ?
$$\sqrt{x} = -1\\ \sqrt{x} = i^2\\ x = i^4 ;$$
$\sqrt{i^4} = (i^4)^{\frac12} = i^{4\times\frac12} = i^2 = -1.$
$i^4$ isn't a solution either: $$\sqrt{i^4} =\sqrt{(-1)^2} =\sqrt1\ne-1.\tag1$$
The contradiction between $(1)$ and $(2)$ arises from the red step being invalid.
On a related note: if $\boldsymbol{(z^x)^y\ne z^{xy}}$ (as is the case here) and $\boldsymbol z$ is nonzero, then it must be that $\boldsymbol x$ and $\boldsymbol y$ aren't both integers. Equivalently: for every nonzero complex $z$ and integers $x$ and $y,$ ${(z^x)^y=z^{xy}}.$
Also: $\sqrt a$ usually refers to the principal square root of the nonnegative real number $a.$