Good morning chillsdj,
Welcome to the Apple Support Communities!
I understand you are getting an error when you enable Sync Library for Apple Music on your Mac. What is the exact error message you are seeing? When did this issue begin? Please restart your computer and try the steps below. I've highlighted some key information here for you. Click on the links for complete details.
If songs are missing from your music library after you turn on Sync Library
"You might be able to fix your issue by turning Sync Library off for all of your devices, then turning it back on again.
"Check your settings and network connection on all of your devices:
Apple Music isn't a backup service. Make sure to back up your music library before you make any changes.
If you still need help with Sync Library, contact Apple Support."
Turn on Sync Library with Apple Music
Take care.