Skip to main content

I'm running the Trailhead tutorial at  https://trailhead.salesforce.com/content/learn/projects/quick-start-lightning-web-components/create-a-hello-world-lightning-web-component?trail_id=build-lightning-web-components

I'm at the "Deploy to Your Trailhead Playground" and I'm getting an error. I right clicked on force-app\main\default folder and then selected "SFDX: Deploy Source to Org" per the instructions. I get the following error message:

Error deploying or retrieving source: The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json file. Add this location to your "packageDirectories" value, or deploy or retrieve a different file or directory

 

Below is the content for my sfdx-project.json.  

{

  "packageDirectories": [

    {

      "path": "force-app",

      "default": true

    }

  ],

  "name": "HelloWorldLightningWebComponent",

  "namespace": "",

  "sfdcLoginUrl": "https://login.salesforce.com",

  "sourceApiVersion": "54.0"

}

3 个回答
0/9000