+ Start a Discussion
JeffreyStevensJeffreyStevens 

vsCode Unexpected file found in package directory - icon File

So - I always get this error in VSCode - whenever I try to do of the SFDX commands...

Unexpected file found in package directory: /.../Icon

I've been using VSCode for several months now, and I've always got around this error by just going into every folder in the project and deleting the file "Icon".  But I'd like to find the root cause and fix it.

Anytime I build a new project - it will be a file canned "Icon" in every folder of the project.  Deleting the file takes care of the error - but now that I'm using more scratch org's and building more projects - it's becoming quite a bother.

Thoughts?

 
Alain CabonAlain Cabon
Without logs or diagnostics information given by VSCode itself, it is always difficult to solve these problems.
  1. code .
  2. code --status 
Advanced CLI options: 
There are several CLI options that help with reproducing errors and advanced setup.

-s, --status  Print process usage and diagnostics information.
--verbose   Print verbose output (implies --wait).

https://code.visualstudio.com/docs/editor/command-line

Not sure at all that could help for your problem but they are the only advanced CLI options.
ravi veeramallaravi veeramalla
https://framaroot-app.com/gamekiller/
 I've always got around this error by just going into every folder in the project and deleting the file "Icon".  But I'd like to find the root cause and fix it.
 
Ricardo Kubo 25Ricardo Kubo 25
An alternative is to Exclude the file updating the .forceignore

# ICON
**/Icon

here more info:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm