Hi community, thanks for being awesome! I’ve found this to be one of the most useful places to come when I run across weird errors so I wanted to document this one here.
Scenario: Page loads in Visualforce, but in Lightning it refuses to load and throws an error in the console (“Cannot read property ‘setParams’ of undefined”)
Cause: In this case, this error was occurring because the page referenced a custom label that didn’t actually exist within Salesforce. Removing the reference to this label (or adding it as a custom label) fixed the issue.