To solve this error: Load your library at the beginning of all your scripts.
There can be multiple other reasons for this issue:
Path to CDN library you included is not correct
The library file is corrupted
Conflict with Other Libraries
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!