I have the following js-meta.xml file for a lightning component. When I save this I get an error:

The 'targetConfig' tag doesn't support text.

What is the solution for this?

<?xml version="1.0" encoding="UTF-8"?>
    <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
            <targetConfig targets="lightning__FlowScreen">​
                <property name="recordId" label="Record Id" type="String" />

Without the targetConfigs node there are no problems.

Note: What I'm trying to do is take an existing working component from a Record page and allow it to be run from within a flow. I believe I need to pass in the recordId to the component to get the data wired correctly.

  • Try using a different property name than the standard recordId parameter
    – Raul
    Commented Dec 10, 2019 at 20:28
  • Sadly still same error with 'lorem' as the parameter name. Will try rebuilding meta file from scratch and also try with another component to see if I can get it to work. Commented Dec 10, 2019 at 20:56

4 Answers 4


Annoyingly(?) the answer was to retype the metadata from scratch - the same format and parameter names, etc... worked so may have been an issue with copy/paste into VSCode from the net.


Try adding default="{!recordId}" to the tag's directives

    <targetConfig targets="lightning__RecordPage">
            label="Record Id"
            description="Automatically bind the page's record id to the component variable"
            default="{!recordId}" />

Just Refresh the visual studio code by using command " workbench.action.reloadWindow ", that will resolve your issue.


If you have copy pasted from developer guide, you would find a junk character in this line, espcially in the end - so try removing > and type again. You can also check from https://www.textmagic.com/free-tools/unicode-detector (atleast I found the junk character using this tool)

<targetConfig targets="lightning__FlowScreen">​

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .