"dart: Command not found" when running Dart commands in Codemagic

Viewed 595

when I try to run Dart commands (even simple dart --version) in Codemagic it fails with an error saying dart: command not found.

1 Answers

to overcome the issue you need to update your scripts to run $FLUTTER_ROOT/bin/dart instead.

There is no separate Dart SDK on Codemagic build machines, only Flutter SDK and you can use the Dart version shipped with Flutter.

For instance

#!/bin/sh

$FLUTTER_ROOT/bin/dart --version
Related