I created a property tag (for our purposes we will call it "isFlow") in the LWC js-meta.xml file, and I decided I wanted to change the data type of the property from String to Boolean. After doing this, and trying to deploy, I was confronted with about 13 separate similar errors as shown below.
lwc/xxx.js-meta.xml: You can't change the property type for the
'isFlow' tag specified in targetConfig lightning__RecordPage. The
component is in use on a Lightning page.
This question here is similar, but doesn't have a final answer.
My question is since we re-use this component in several places, is there any other way to change/remove this property without having to remove references and save from 13 other places? Then go back add them again? I don't recall design variables in Aura Components being as fussy.
Note: I removed about 6 other properties for security purposes.
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="ChsServicesAPI">
<apiVersion>51.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
<target>lightningCommunity__Page</target>
<target>lightningCommunity__Default</target>
<target>lightning__FlowScreen</target>
</targets>
<targetConfigs>
<targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage,lightningCommunity__Default,lightning__FlowScreen">
<property name="isFlow" type="String"/> <-- Trying to Change this to Boolean -->
</targetConfig>
</targetConfigs>
</LightningComponentBundle>
Best Answer
You can pull your Lightning Pages and other dependent metadata down to your local VS Code, run a Find/Replace across your project, and simply do a
force:source:push
orforce:source:deploy
, that will deploy all the changes at once.