If your project in developer mode then this error appears when I switch from Client-Side to Server-Side Compilation in
Stores->Configuration->Advanced->Developer->Frontend Development Workflow > Workflow type
So customer-data.js uses the localStorage within the browser itself to store a variety of information, so you can clear the Magento Cache all you want and you will still have issues.
If you still getting the issue then clear the Local Storage session & Cookies.
You can clear using the following way:
- Google Chrome is hit F12 to open the Developer Toolbar
- Then select the Application tab. Clear the Local Storage, Session Storage, and Cookies.
- Reload the page and all should be well.
- You will have to do this on your admin page as well.
Click here for more refrance
I hope it helps! Thanks.