Search code examples
dartedge-function

dart run edge build cloudflare_workers --dev command doesn't work in my project(laptop)


enter image description here

I have installed all tools for this, I couldn't forget something. How to fix this issue?

I did these commands:

  • vercel build
  • wrangler dev --local
  • edge build supabase_functions --dev

All commands are same problem.


Solution

  • The reason for this problem is that the edge package that compiles Dart to JavaScript supports older version of Dart. Dart is giving an error after not recognizing that new features have been added to the Dart SDK.

    It is highly likely that you have the latest Dart SDK installed locally; downgrading the SDK (to, e.g. 2.19.0) might solve your problem.