@emailmikespainhower-com I can confirm that the code you supplied causes this error.
Change your action to run on the ‘after_theme_setup’
@kevinw I don’t know if you have a similar issue, but it’s more than likely that you are trying to access acf before it has been initialized.
It appears that accessing fields before ACF is ready causes ACF to initialize early, including registering scripts and styles and this early initialization is what’s causing the errors.