Error Invalid runtime
param: Value must be one of (node-16.0, php-8.0, ruby-3.0, python-3.9, dart-3.0) but dart 3.0 is added to server
can you run docker compose exec appwrite vars
and see if it's being used by appwrite?
appwrite version?
1.4.2
Can you pls send screenshot of Console when you see this error? (or CLI)
cli
Hmm curious what it sends as runtime π€ Did you run init
or deploy
? If Init, you selected dart-3.0
, right?
This function was created long before, at that time appwirte version used in function was 8.0.0 and server flutter sdk was 2.17.0. So when i upgraded appwrite version to 10. 0.0 after deployment i got an error about flutter sdk version wanted to be 2.19.0 to 3.0.0 . so we upgraded the server sdk version to 3.0.0 now i cant deploy function above error comes.
This was the first error
Hmm its using Dart 2.17. In appwrite.json
your function wants Dart 2.17.
From your perspective, would you like to stay on Dat 2.17, or use latest Dart 3.0?
use dart 3.0. dart in the server was changed to that
Okie, cool. Now visit your appwrite.json
(in folder where you are running appwite
CLI commands), and there will be definition of your functions. In each, there will be runtime
. Change that to dart-3.0
. After saving, the CLI command should work
Thanks it got deployed. but my trouble is not over i am not sure if its my function code issue or server side. please check the screenshot
You should not see that exact error now, as you are using different dart version.
Can you share new error? it might be similar, but versions should differ
new error
I think we now enforce lib structure in Dart.
So you need your entrypoint to be inside lib
folder
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...