function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Wade Lovell 84Wade Lovell 84 

Use Apex to Work with Data - The '=' sign in 'columns = COLUMNS' is the source of the error, "Class properties must be methods."

Javascript / Trailhead Challenge issue. 

import { LightningElement, wire } from 'lwc';
import FIRSTNAME_FIELD from '@salesforce/schema/Contact.FirstName';
import LASTNAME_FIELD from '@salesforce/schema/Contact.LastName';
import EMAIL_FIELD from '@salesforce/schema/Contact.Email';
import getContacts from '@salesforce/apex/ContactController.getContacts';
const COLUMNS = [
    { label: 'Contact First Name', fieldName: FIRSTNAME_FIELD.fieldApiName, type: 'text' },
    { label: 'Contact Last Name', fieldName: LASTNAME_FIELD.fieldApiName, type: 'text' },
    { label: 'Email Address', fieldName: EMAIL_FIELD.fieldApiName, type: 'text' }
];
export default class ContactList extends LightningElement {
    columns = COLUMNS;
    @wire(getContacts)
    contacts;
}

Throws this error, "Class properties must be methods. Expected '(' but instead saw '='. (E054)' Seems this may be a the premature use of a feature at Stage 2 but not generally available (except in packages like Babel, perhaps?).

Would like to complete the challenge.
Thanks in advance,
Wade
AnudeepAnudeep (Salesforce Developers) 
Try reaching out to Trailhead Support for assistance
Wade Lovell 84Wade Lovell 84
Thank you Anudeep for the suggestion. I happen to know Trailhead Support is overwhelmed with over a three business day backlog because I actually needed something Sunday night ONLY they could do. Definitely wanted to reach out to the Community first for this one. Make it a great one, Wade