What I’m trying to do:
I have a public dependency called Anvil Squared, App ID KDKDM3MG6IQHC2FK
I am copying an app to a client’s anvil account, and that app relies on Anvil Squared as a dependency (as well as anvil extras).
The usual dependency errors happen of course so I have to resolve the dependencies.
When I go to resolve the dependencies like this:
It appears to have worked to resolve the anvil_extras components, but the components from anvil squared do not resolve:
The weird thing is that I can bring in anvil squared components no problem. The dependency works in that sense. But existing components in my cloned app, that were coming from the dependency, no longer instantiate. It says the dependency is not found.
I am left wondering, what did I do wrong in my dependency?
Clone Link
I don’t know if it’s the same problem, but reading your question it reminded me of this: Why different dependency ids in for same dependency in different apps?
Thanks, that is the process I go through to “re-map” the dependency. It works for the anvil-extras dependency, but not for my own dependency called anvil squared.
There’s probably something going wrong in that process of re-mapping, I agree that has something to do with this issue
Solved: I checked the yaml files and found a discrepancy.
My dependency_id for anvil extras in the anvil.yaml were matching the components in the various form templates:
Here was the anvil.yaml
dependencies:
- dep_id: dep_dmhomulhrajp9w
resolution_hints: {app_id: CVAFGUBPSRFZNPZD, name: anvil_extras, package_name: anvil_extras}
version: {version_tag: v3.1.0}
- dep_id: dep_dpwmywm5c9x8
resolution_hints: {app_id: KDKDM3MG6IQHC2FK, name: Anvil Squared, package_name: anvil_squared}
version: {version_tag: v1.0.3}
Here was an anvil extras component
form:dep_dmhomulhrajp9w:MultiSelectDropDown
BUT for an anvil squared, component, a different dependency ID!
form:dep_yfmcrf11pl29j4:Pagination
When I change that to:
form:dep_dpwmywm5c9x8:Pagination
The clones now load the components properly.
Something I did, and don’t remember doing, messed up these yaml files. Could be when I:
- Changed the dependency from a private to a public one
- Remapped them a bunch of times
1 Like