You must be using the minify option in W3TC. This is typical with any minification solution, which combines scripts into a single file and then minify it. When the scripts are combined, the order of the scripts may have changed, causing script errors.
If you’re going to use that feature, you’ll need to learn how to:
1. Find which specific script that’s not included in order
2. Exclude that script from the list of minified script