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