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?
5 Answers
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.
If restarting VCode (which should activate the extension) does not solve the problem, try authorizing the org again.
-
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 BCommented Apr 19, 2021 at 10:13
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
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
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.
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.
push on save
is super handy.