Hi Folks, I am trying to deploy a functions directly from my local machine using the appwrite cli.
Am I doing something wrong 😄
I recommend creating the function and everything with the cli way
First create a folder
Open it in your command line
(using cd
command)
Once you're in the folder, run
appwrite init project
Then
appwrite init function
Create a new function with a name and ID
Yeah I can try that ( Anyways I am not blocked, I used the manual way for now to get started). I created this thread to understand what’s wrong here, is it something with the cli in general or the params being passed. If so then there’s scope to improve docs or create awareness on how to use cli.
Is there a space after the comma? Spaces cause problems on linux, not sure about powershell
I just copied the command from the UI (and its in PS)
I don’t think there’s any space there
Not sure, but anyways, I recommend going through the CLI way I mentioned. Forgot to say that after following the aforementioned steps, you get a folder with a function template. You just modify it and write the
appwrite deploy function
Command
Is there a reason why you are using older version of appwrite cli? The latest version should be 2.0.2
I was using that only, it didn’t work so I went to appwrite cli npm registry there I saw that version and I downgraded thinking the docs are per old cli😅
createDeployment command might not have existed in 0.x. Thats 2 major versions behind!
I can post the error after updating the package again
But as far as I remember it was exact same error
Where is the third screenshot from? That seems to need correction 😄
Npm resgistry😅
ahh its the docs for 0.17
Could you try putting it all in a single line without the comma
As said, I think if you create a function by the way I mentioned, you will have 0 problems with current and future functions
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...