Salesforcedx-vscode: Error when trying to deploy file of LWC or Aura

Created on 5 Sep 2019  路  19Comments  路  Source: forcedotcom/salesforcedx-vscode

Summary

The ability to make deploy using shortcode stop because after the last release is the CLI stop to detect that file send is a component to get a folder and send all folder

Steps To Reproduce:

  1. Open LWC folder, open any component folder
  2. Choose one file and click with the right button on it, and then select the option "SFDX: Deploy Source to Org".
  3. Look for output and you will see the error message

Expected result

The folder component be deployed

Actual result

Get error message on output:

SfdxError: You must specify the Aura bundle folder, not an individual component.

Additional information

VS Code Version: 1.38.0

SFDX CLI Version: 7.23.1-ced0ec4940

OS and version: Windows 10 - Version 1903 (OS Builder 18362.329)

deploretrieve bug

Most helpful comment

This has been fixed in version 7.25.3 of the CLI. Run sfdx update to get the latest version

All 19 comments

I am having the same issue. Have you found a workaround?

Just figured out if you go a few folders up and deploy it seems to work for some reason.

I am having the same issue.

sfdx --version
sfdx-cli/7.23.1-ced0ec4940 win32-x64 node-v10.15.3

VSCODE:

Version: 1.38.0 (user setup)
Commit: 3db7e09f3b61f915d03bbfa58e258d6eee843f35
Date: 2019-09-03T21:49:13.459Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17763

I have same problem. I have setting auto save on- "salesforcedx-vscode-core.push-or-deploy-on-save.enabled": true

Error message: "SfdxError: You must specify the Aura bundle folder, not an individual component."

sfdx plugins -v
sfdx-cli/7.23.1-ced0ec4940 darwin-x64 node-v10.15.3

Just figured out if you go a few folders up and deploy it seems to work for some reason.

Hi @dbarks1024 can you please provide more details, as in, were you able to deploy the LWC bundle on save of an individual html, JS file. what do you mean when you say "go a few folders up and deploy".

I am having a similar issue while saving the html, js file in LWC. I created a Github issue as well

1640

@ntotten this issue is similar to #1640

I ran into this problem as well when I upgraded sfdx-cli to 7.23.1. I got this warning after the upgrade:

warning "salesforcedx > force-language-services > @salesforce/command > @oclif/[email protected]" has unmet peer dependency "@oclif/config@^1".
sfdx-cli: Updating plugins... done

I was able to work around it by completely uninstalling/removing sfdx-cli and reinstalling version sfdx-cli/7.22.0 via npm.

Just figured out if you go a few folders up and deploy it seems to work for some reason.

Hi @dbarks1024 can you please provide more details, as in, were you able to deploy the LWC bundle on save of an individual html, JS file. what do you mean when you say "go a few folders up and deploy".

Hi @pranaymistry In VS code I went a file up and right clicked it (/force-app/main/default/lwc) then selected deploy source to org. I had to turn off the setting where it deploys on save as well.

Just figured out if you go a few folders up and deploy it seems to work for some reason.

Hi @dbarks1024 can you please provide more details, as in, were you able to deploy the LWC bundle on save of an individual html, JS file. what do you mean when you say "go a few folders up and deploy".

Hi @pranaymistry In VS code I went a file up and right clicked it (/force-app/main/default/lwc) then selected deploy source to org. I had to turn off the setting where it deploys on save as well.

Hi @dbarks1024 thanks for your reply, yeah that's the manual workaround, I was really hoping that you would have figured out a way to save and deploy together. I guess we have no choice but to turn off the save and deploy, and manually deploy files, that sucks.

@ntotten

Can not save individual file but to save the whole component folder, it will works

Hey @ntotten what the status of this?

It's super frustrating having to fiddle around right-clicking on the folder rather than the body of the file when trying to quickly deploy files!

Downgrading to version 7.8 of the sfdx-cli works fine for me. Upgrading to 7.23 and you have the error.

This also impacts Lightning aura and breaks the convenient 'AutoSave on focus change', 'deploy on save' workflow which I've been using for months - I've had to change my VSCode preferences to use manual deploy.

Actually. I've followed the advice of the previous poster and downgraded until this is fixed - too much additional effort otherwise. Instructions here for deleting (if previously installed as a .pkg) and installing via npm:

https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm

https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_npm

npm i [email protected] -g

Can not save individual file with Salesfoce CLI version 7.8.1.0. It was working earlier with the older version of CLI.

SfdxError: You must specify the Aura bundle folder, not an individual component.
This is happening only on windows.

In Linux, for the same sfdx version , It works fine.

I have same problem when i try to deploy my aura controller

ERROR running force:source:retrieve: You must specify the Aura bundle folder, not an individual component.

My SFDX version:
sfdx-cli/7.23.1-ced0ec4940 darwin-x64 node-v10.15.3
OS: macOS Mojave 10.14.6

We've identified the CLI regression and are working to have a fix soon. Stay tuned.

This has been fixed in version 7.25.3 of the CLI. Run sfdx update to get the latest version

Was this page helpful?
0 / 5 - 0 ratings