4

I started experimenting with LWC and ran into this problem. What I did in VSC: - Create Project with manifest; - Authorize an Org; - Create Lightning Web Component; - Create Scratch Org and assigned it by default; I want to do "SFDX: Deploy Source to Org", but I can't find it. What could be the problem?

enter image description here

enter image description here

3
  • Maybe all the plugins are not initiated yet. Did you wait for few minutes? Commented Apr 15, 2021 at 15:25
  • You may need to set the org as default sometimes it is being missed even after Authorization. Btw, enabling push on save is super handy.
    – Raul
    Commented Apr 15, 2021 at 16:32
  • @Rahul Yes. Moreover, I have already created a project twice and a new scratch org.Default Org has also installed, and more than once. Maybe this is not how I create the project? Commented Apr 15, 2021 at 17:41

5 Answers 5

3

This could happen, if the default org is not set properly or more likely, the extension not activated yet.

Ensure that the connector logo appears at the bottom toolbar of VSCode and right-click again to see if SFDX options appear.

enter image description here

If restarting VCode (which should activate the extension) does not solve the problem, try authorizing the org again.

3
  • At first glance, everything seems OK. Added a screenshot of the VSC. Commented Apr 16, 2021 at 14:53
  • When I logged in to my main organization, everything is ok, deploy is possible. But as soon as I set the default organization to the new Scratch Org, the deploy disappears. What other settings do I need to make? Commented Apr 16, 2021 at 15:40
  • Once you set the default to new Scratch org, did you get the success message ended with exit code 0 on your VSCode terminal?
    – Kishan B
    Commented Apr 19, 2021 at 10:13
3

As of today (12.09.2021) my observation is that Deploy option in context menu depends to what kind of org you are connected/authorized to (which one is set as a default one).

If it is a sandbox -> You will have a deploy option available. If it will be a scratch org it will be covered by a SFDX: Push sources to the scratch org. I believe that plugin developers assumed that if someone is connected to the Scratch org only push would be used which theoretically should always be sufficient, but sometimes there are some use cases when it would be great to have Deploy option in context menu.

Be aware that deploy do not track changes like push

1

Sometimes it takes some time for VS to start the plugins. If the problem remains after a long time try to close and open again the app

0

I had the same issue on my VS Code. It was solved by changing the version of the Salesforce CLI Integration from v54 to v52.16.0.

0

First run the command, SFDX: Authorize an org and connect to an org and then try the same. You will find the options you are looking for.

You must log in to answer this question.

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