#[SOLVED] Deploy Function
21 messages · Page 1 of 1 (latest)
Ok, I've just found an issue about it : https://github.com/appwrite/website/issues/387
variables is not anymore supported in appwrite.json, you've to use "vars"
Does it got solved by doing that?
Yes, just migrate my old appwrite.json replacing variables to use "vars" and now, it's fixed
@patent thunderCan I mark this as solved then or do you need further assistance?
no, it's solved
[SOLVED] Deploy Function
But the documentation is not up to date : https://appwrite.io/docs/tooling/command-line/deployment#function-options
And even if the deploy don't crash now, the deploy never update my vars on the appwrite instance, so it can't be reopen 🙂
I think it is because my server don't have the same version than the cli. To my server waiting for 'variables' and the cli waiting for 'vars'
Weird
@solid lion do you have any idea about why it shows variables instead of vars?
😅 Yeah I feel like we just missed changes with Appwrite.json
@dense sleet Does CLI deployment even work with environment variable anymore?
Not a big problem, because we can have another solution by using the website to add ours variables, but quite long with ours 25 functions 😵💫
yes, with variables key: https://github.com/appwrite/sdk-for-cli/blob/master/lib/commands/deploy.js#L300
Only recommended for non-secret keys
@patent thunder Are you using latest cli version?
yes, but my server is not on the latest version
Ahhh I see, you can install older versions
https://github.com/appwrite/sdk-for-cli/releases
Install by version tag using NPM
Hello team. I am having the same issue when trying to deploy a function. I think this has something to do with this statement https://github.com/appwrite/sdk-for-cli/blob/b72ade6ae73ee8895490922dbcecc013703440f6/lib/commands/deploy.js#L313C24-L313C39 which uses an undefined variable remoteVariables