Giter Site home page Giter Site logo

Comments (5)

MichealReed avatar MichealReed commented on July 24, 2024 1

Closed my related issue and wanted to add @htsuruo's very cool example repository. May be very useful in diagnosing this -- https://github.com/HTsuruo/dart-edge-supabase-playground/tree/main

Thanks for the guide and workaround too 🙏

from dart_edge.

MichealReed avatar MichealReed commented on July 24, 2024 1

Maybe an override of dart:html with https://pub.dev/packages/universal_html would work?

from dart_edge.

Zekfad avatar Zekfad commented on July 24, 2024

If fetch is conforms to browsers' one you may try to use fetch_client, it is independent of io or html, using only js interop to call global fetch function.

from dart_edge.

noga-dev avatar noga-dev commented on July 24, 2024

Maybe an override of dart:html with https://pub.dev/packages/universal_html would work?

Tried.

root@DESKTOP-IAH5ULT:/mnt/d/src/hackathons/2023/intellitask/functions# npx supabase functions serve dart_edge --no-verify-jwt --env-file ./.env
Serving functions with legacy supabase/deno-relay:v1.6.0... Run functions serve instead to use Edge Runtime.
Starting supabase/functions/dart_edge
Serving supabase/functions/dart_edge
Watcher Process started.
Check file:///home/deno/functions/dart_edge/index.ts
UnsupportedError {
  message: "Platform._version",
  "$thrownJsError": Unsupported operation: Platform._version
    at Object.wrapException (file:///home/deno/functions/dart_edge/main.dart.js:2247:17)
    at Object._Platform__version (file:///home/deno/functions/dart_edge/main.dart.js:8509:15)
    at Object._Platform_version (file:///home/deno/functions/dart_edge/main.dart.js:8565:16)
    at file:///home/deno/functions/dart_edge/main.dart.js:39067:74
    at Object.holder.<computed> [as $get$Platform__version] (file:///home/deno/functions/dart_edge/main.dart.js:130:21)
    at Object.HttpClient_HttpClient (file:///home/deno/functions/dart_edge/main.dart.js:250:14)
    at WindowController_onChooseHttpClient_closure.call$1 (file:///home/deno/functions/dart_edge/main.dart.js:36649:75)
    at WindowController.onChooseHttpClient$1 (file:///home/deno/functions/dart_edge/main.dart.js:36642:44)       
    at file:///home/deno/functions/dart_edge/main.dart.js:36609:48
    at _wrapJsFunctionForAsync_closure.$protected (file:///home/deno/functions/dart_edge/main.dart.js:4927:15)

from dart_edge.

noga-dev avatar noga-dev commented on July 24, 2024

Sounds like the only way to get OpenAI's API to work atm is to call another function which handles the call and just returns the result.

https://supabase.com/docs/reference/javascript/functions-invoke

Which defeats the point of using Dart Edge functions at all, and one may as well just use Deno to begin with.

from dart_edge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.