In our case this was a bit of code in a default template which was loading the customer-data.js file after it had already been called on the success page.
We found file: vendor/magento/module-checkout/view/frontend/templates/success.phtml
was loading this code:
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData) {
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
});
</script>
Removing this code fixed it, which we did by creating a copy of this file in our theme templates directory and removing the offending code snippet.
You can use Chrome Dev tools to find out where the error was happening and then just before in that file on your local dev add in a console.trace(); call to establish what was calling the function which is throwing the error in the console. Follow the chain to where you are loading things improperly.
static-content deploy– Murtuza Zabuawala Feb 20 '17 at 06:07C:\wamp\bin\php\php5.6.30> php C:\wamp\www\magento\bin\magento setup:static-content:deploy
and the result was Successful: 2217 files; errors: 0
– Zammuuz Feb 20 '17 at 06:59after this command run
php bin/magento setup:static-content:deploy
– Minesh Patel Feb 20 '17 at 07:07What should i do now to load the correct version? :(
– Zammuuz Feb 20 '17 at 08:00