I have noticed lately on the new OS X updates that when you copy and paste - there are some characters that throw off compilers or linters.
Retyping everything exactly how it appears solves the problem. I believe there may some hidden characters or something causing this with Apple’s latest updates.