function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vinicius ZVinicius Z 

Salesforce DX: package naming conflict when deploying to sandbox

Hello all, 

I tried to migrate a custom object and its trigger from my "happy soup" to an unmanaged package to use it with SFDX. Since I had some code refactoring to do beforehand, I created a sandbox from production with the object and its trigger.
I refactored, created an unmanaged package from the sandbox, created an SFDX project out of its metadata and uploaded the package successfully in that sandbox (hooray!)

Problem is, I can't install that package version in my other sandboxes because "A component in the package conflicts with an existing component, please rename it". Well, of course it does, since in order to create a package from my happy soup, it was in the soup to begin with!
How does one deal with that? How can my sandbox understand that. by installing this package, I'm packaging its current metadata and not creating new metadata with conflicted naming?

I hope it's clear and I can clarify further if it isn't, thank you all for your time!