-1

My Vs code is not deploying the changes to the org. I have done all the changes multiple times

  1. Uninstall VS code
  2. Uninstall Salesforce cli
  3. Install java version 11 (Recommended)
  4. Install Salesforce CLi
  5. Install Vs code

OS : MAC

Still the issue is coming. Please find the attachment Whenever i make changes to the code like (LWC, apex class ) and click Command +S. an error is occurred as shown in the screenshot.

Please let me know how to fix my VS code.

enter image description here

0
3

I'd suggest going into Settings of the VS Code Extensions and disabling "Push-or-deploy-on-save." Then just manually deploy your changes. You can left-click on the folder you wish to deploy and choose "Deploy Source to Org."

Also, I see your terminal output is "DX Companion." If that is a third-party extension called "SalesforceDX Code Companion," I would suggest only using the standard Salesforce VS Code extensions and disabling that.

Edit: Given your list of extensions, I'd recommend uninstalling "Salesforce CLI Command Builder" and "Salesforce Package.xml Generator Extension for VS Code." Then, install the Salesforce Extension Pack. Also, make sure you have the Salesforce CLI beforehand.

Here is some documentation on the Salesforce Extension Pack for VS Code and a link directly to the Extension Pack.

3
  • Hi @coogie. I have followed the two changes as mentioned in the above comment. Still when i click on cmd+ S. Still the same message is getting displayed in terminal *********************************************************** Error: Run sfdx help for a list of available commands. shishir.bansal@shishirb-ltm here2serve1 % sfdx deploy:lwc -p "/Users/shishir.bansal/Desktop/here2serve1/here2serve1/force-app/main/default/lwc/productSearch/productSearch.js" › Warning: deploy:lwc is not a sfdx command. Did you mean help? [y/n]: › Error: Run sfdx help for a list of available commands.
    – user43388
    Nov 4 '20 at 4:41
  • @user43388 - I updated answer to help you. Your list of extensions seemed off. Start with the official Salesforce extension pack.
    – Coogle
    Nov 4 '20 at 14:33
  • Hi @coogie7 thanks for the reply. I got the Vs code running. It was a silly mistake i was doing after I have removed all the extensions and installed the official one. I was sometimes saving the file and then deploying and sometimes not saving and just deploying. seems like i got this habit from Intellij via Illuminated cloud . Now Vs code is workinf. Thanks
    – user43388
    Nov 8 '20 at 16:52
1

From a quick Google, that command is part of this https://github.com/msrivastav13/mo-dx-plugin and that will not be present by default.

I recommend using the base SFDX commands such as sfdx force:source:deploy unless you have a strong reason to use alternate tools. The SFDX tools are more complete now than they were a couple of years ago.

2
  • Hi @Keith, I have checked and uninstalled that extension . Right now i have only 4 extensions 1. Eslint 2. Salesforce CLI Command Builder 3.Salesforce Package.xml Generator Extension for VS Code 4. XML Still the same issue . ******************************** Error: Run sfdx help for a list of available commands. shishir.bansal@shishirb-ltm here2serve1 % sfdx deploy:lwc -p "/Users/shishir.bansal/Desktop/here2serve1/here2serve1/force-app/main/default/lwc/productSearch/productSearch.js" › Warning: deploy:lwc is not a sfdx command. Did you mean help? [y/n]: Not ableto deploy
    – user43388
    Nov 4 '20 at 4:47
  • Thanks @keith. my vs code is working now
    – user43388
    Nov 8 '20 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.