There is issue in saving lightning components. Lightning components which has controller(which is referring User's fields).
Error message are stating like - There is no such column "Email" on User entity; where as the running user is System administrator.
Let us know, if someone found root cause, or work around for the same.
Update: Added sample code to reproduce the same
Sample component: SampleComponent.cmp
<aura:component controller="SampleClass">
Hello World
</aura:component>
SampleClass
public class SampleClass {
public SampleClass(){
User u = [select id, email, mobilephone from User where id=: UserInfo.getUserId()];
System.debug('Email: ' + u.email);
}
}
Error message
Failed to save SampleComponent.cmp: Invalid definition for null:SampleClass: select id, email, mobilephone from User where ^ ERROR at Row:1:Column:12 No such column 'email' on entity 'User'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.: Source
User
?