Error deploying Lightning Web Components to Winter '21 Orgs
Metadata , Salesforce DX , Winter 21
Last updated 2022-02-10 ·Reference W-8104609 ·Reported By 1 users
Summary
Error deploying Lightning Web Components to Winter '21 Orgs
Repro
1. Authenticate to a Winter'21 org using SFDX CLI or via MDAPI using package.xml (Workbench/Ant)
2. Try to deploy LWC components which case multiline code comments in js file.
3. You will notice error similar to below:
Error:
====
problem: bad result: TypeError: Cannot read property 'match' of undefined at scanIdentifier (/home/sfdc/tools/lwc/1.7.10/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/doctrine/lib/doctrine.js:258:96) at parseName (/home/sfdc/tools/lwc/1.7.10/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/doctrine/lib/doctrine.js:316:29) at TagParser.parseName (/home/sfdc/tools/lwc/1.7.10/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/doctrine/lib/doctrine.js:499:34) at TagParser.parse (/home/sfdc/tools/lwc/1.7.10/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/doctrine/lib/doctrine.js:768:34) at parseTag (/home/sfdc/tools/lwc/1.7.10/node_modules/@lwc-platform/sfdc-lwc-
Sample Code:
===========
import { LightningElement } from 'lwc';
export default class testCmp extends LightningElement {
/*
@param {event} event.
*/
someVar;
}
Workaround
Issue is very specific & fails only when there is a trailing dot(.) at the end of comments. Updating the above code comments something other than dot(.) in the end works fine.
For Ex:
=====
/*
@param {event} event
*/
Reported By (1)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.