forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
949 stars 404 forks source link

SFDX: Rename Component command fails when there's no aura folder in project #5692

Closed pozil closed 2 weeks ago

pozil commented 1 month ago

Summary

When using the SFDX: Rename Component command on a LWC you get the following error if you don't have an aura folder in your project:

15:21:54.155 Starting SFDX: Rename Component ENOENT: no such file or directory, scandir '/USER_PATH/my-project/force-app/main/default/aura'

I don't expect the aura folder to be required especially in new projets with no Aura components.

Steps To Reproduce:

  1. Create a new project
  2. Get rid of the aura folder
  3. Create a new LWC
  4. Try to rename the LWC with the SFDX: Rename Component command

Expected result

The component is renamed. The presence of an aura folder should not be a requirement.

Actual result

You get the following error:

15:21:54.155 Starting SFDX: Rename Component ENOENT: no such file or directory, scandir '/USER_PATH/my-project/force-app/main/default/aura'

Additional information

Salesforce Extension Version in VS Code: Salesforce Extension Pack 61.5.0

Salesforce CLI Version: @salesforce/cli/2.50.6 darwin-arm64 node-v18.17.0

OS and version: macOS Sonoma 14.5

VS Code version: 1.91.1

git2gus[bot] commented 1 month ago

This issue has been linked to a new work item: W-16285103

CristiCanizales commented 1 month ago

Hello @pozil! Thanks for creating this issue, I was able to reproduce it and the above WI has been created to address it.

daphne-sfdc commented 2 weeks ago

Hi @pozil, This is fixed and published in this week's release v61.10.0. Please upgrade your Salesforce Extensions for VSCode to the latest version to get the changes. 🙂