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
Ayan JanaAyan Jana 

Error: Value too long for field: Source maximum length is:131072 for a HTML file in LWC. Need a workaround for it

Hi, I'm using a complex LWC component where I'm using multiple tables. Because of that the storage limit is getting exceeded and I'm getting this error: "Error: Value too long for field: Source maximum length is:131072"

If anyone can let me know how to workaround this problem, that'd be very helpful. Thank you!

Suraj Tripathi 47Suraj Tripathi 47
Hi,

Can you please update the salesforce latest plugins with the below command; 
sfdx plugins:install salesforcedx@latest

Please mark it as Best Answer if it helps you.

Thanks & Regards
Suraj Tripathi
Ayan JanaAyan Jana
Hi Suraj, I've done this but still receiving the same error. 
mukesh guptamukesh gupta
Hi Ayan,

This is presumably because the maximum length of the database row the source is stored in is 131072 characters long.

You will need to split your component into multiple, smaller components to get under this maximum limit. The design principles of LWC is that you have many smaller components that make up the large components,

so this limitation makes sense from that design philosophy.

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh