When trying to access the Login component of my MERN app on the production version, I get a series of the following type errors shown in this image:
My app (https://github.com/ahaq0/kumon_schedule) works perfectly fine locally and was working perfectly fine hosted on Heroku earlier today.
I tried rolling back all of the changes in the code that I made today to no avail. Similarly, I checked the package.json (and .lock) to see if I changed the material UI dependency but that was the same. I can't seem to figure out why it stopped working all of a sudden on the hosted version here.
The code for the line of the error is below. However, I did not write as it's a part of material UI.
if (sheetManager.dynamicStyles) {
var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({
link: true
}, options));
dynamicSheet.update(props).attach();
state.dynamicSheet = dynamicSheet;
state.classes = mergeClasses({
baseClasses: sheetManager.staticSheet.classes,
newClasses: dynamicSheet.classes
});
if (sheetsRegistry) {
sheetsRegistry.add(dynamicSheet);
}
} else {
state.classes = sheetManager.staticSheet.classes;
}
sheetManager.refs += 1;
This is my first deployed app and I'm at a loss how everything went from working to not working despite my best attempts to roll things back.
Edit. I should mention I tested in Firefox as well as Chrome where the error log is from.
Edit #2. After a lot more debugging I found out that the error is gone if I roll back to commit fccc55a5 via Heroku. However, if I make a new branch with that commit and try to deploy that branch, it will not work.
Please see here https://github.com/ahaq0/kumon_schedule/compare/fccc55a5...fccc55a5
When I revert to that last build in Heroku it will work. But if I merge that previous commit into a new branch and try to deploy it, it will not.