Interesting - I think this explains why this script runs when launched from the editor, but fails from the command-line. I never investigated that. Passing the sdk location in on the command-line is a good solution. Generally, I think tools are using "--dart-sdk".