I tried to add a main.js to my Magento theme using the answer on How To add JS file in frontend for all pages, however, it caused issues so I removed this, however, I still get console error for this.
Uncaught SyntaxError: Unexpected token } in JSON at position 199
at JSON.parse (<anonymous>)
at getData (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/mage/apply/main.js:51:24)
at Array.map (native)
at HTMLDocument.apply (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/mage/apply/main.js:67:18)
at fire (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/jquery.js:3232:32)
at Object.add [as done] (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/jquery.js:3291:8)
at jQuery.fn.init.jQuery.fn.ready (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/jquery.js:3542:26)
at jQuery.fn.init (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/jquery.js:2967:11)
at jQuery.fn.init (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/jquery/jquery-migrate.js:225:17)
at jQuery (http://domain.dev/products/pub/static/version1497885161/frontend/aa/aa-theme/en_US/jquery.js:75:11)
I've tried to resolve this by removing the contents of pub/static and ran the PHP bin/magento setup:static-content: deploy but the console error still appears and is causing all javascript elements on my Magento site to not work.