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
sai ramsai ram 

what is the limaitation of lightingwebcomponent deployed from vs code to salesforce org

hi iam developing one lwc component iam facing issue with 
Error: Value too long for field: Source maximum length is:131072

how to resolve this issue.
VinayVinay (Salesforce Developers) 
Hi Sai,

Please update the salesforce latest plugins with the below command. 
sfdx plugins:install salesforcedx@latest
Thanks,
Vinay Kumar
sai ramsai ram
Iam facing this error when run the run command.
VinayVinay (Salesforce Developers) 
Hi Sai,

This limit indicates that your configuration file is too large.  Try to reduce the complexity of your metadata to fit within this limit, probably by using multiple components. It sounds like your current component is entirely too complex.

References:
https://salesforce.stackexchange.com/questions/282862/lwc-file-size-restriction-on-js-file
https://salesforce.stackexchange.com/questions/308188/failed-to-save-lightning-component-value-too-long-for-field

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
Edgars Everts 6Edgars Everts 6

Hi 
While deploying LWC ( for LWC helloWord project ) to playground ORG faced similar error message:
Failed to save Lightning Component Resource [lwc/helloWorldLightningWebComponent/HelloWorldLightningWebComponent/.sfdx/tools/soqlMetadata/standardObjects/User.json] 
of Lightning Component Bundle [helloWorldLightningWebComponent]. 
Error: Value too long for field: Source maximum length is:131072

At the end I realized the I have another project under LWC folder.
Once project folder cleaned up, next deployment attempt had no error.

Kind regards
 

Anjum TadmodAnjum Tadmod
Deleting all the files in the org under the LWC folder helps.