App dependency not found error

I have installed my anvil app in my own Linux server but when I use external component library (slider example of anvil works) it gives an error. Error is like:
This app may be disconfigurated. Following error occurs
App dependency not found
But if I don’t use this external component, App works well. What can I do?

Thanks in advance

Note: external component library is : Slider Component

Welcome to Anvil! Most likely you need to configure the Slider Component app as a dependency, and import that dependency to the app in question. The Dependency docs here have a good overview of the steps to take.

Did you work through the steps at anvil-runtime/README.md at master · anvil-works/anvil-runtime · GitHub ? Dependencies don’t just work out of the box with the open source server, you have to tell it where the dependency is on your machine.

2 Likes

I’m having the same issue with the anvil-extras module on my Ubuntu Google Compute Engine VM. I’ve tried adding in the --dep-id tag but it still isn’t working.

Is there a need to clone the anvil-extras repository to the VM also? And if so how do we direct the anvil-app-server to it’s directory?

It’s all explained in the runtime readme

Perhaps I’m just not understanding the documentation correctly. After reading through it and the other anvil docs this is the process I gathered it wanted me to follow:

I’ve cloned my app as well as the anvil-extras repository into my VM

/home/user
|__ My_App_file
… |__ __ init__.py
… |__ anvil.yaml
… |__ client_code etc.

|__ anvil-extras
… |__ __ init__.py
… |__ README.md
… |__ etc.

I’m deploying my app with the command:
anvil-app-server --app My_App_File --origin https://myurl.com/ --dep-id C6ZZPAPN4YYF5NVJ=anvil_extras

The anvil.yaml file of My_App_File has the dependencies in it as laid out in the readme and my client code has the import code
from anvil_extras import augment

and it all runs fine when run on the anvil cloud editor but not on my own VM.
Is there something I have misunderstood here?

In that example, you pass --dep-id C6ZZPAPN4YYF5NVJ=anvil_extras to the app server but the folder name you’ve quoted is anvil-extras

If you pass the correct folder name, does that solve the problem?

1 Like

Ah thanks so much, the folder name was the error! I had to change the folder name that cloned from “anvil-extras” to “anvil_extras” (as python doesn’t support modules with “-” in the name) then all was working perfectly!

Thanks again for your swift help :smiley:

Glad it worked - but that’s nothing to do with module names. You could just pass --dep-id C6ZZPAPN4YYF5NVJ=anvil-extras to the app server.

1 Like