Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Deno #17

Open
rhamzeh opened this issue May 22, 2023 · 0 comments
Open

Support for Deno #17

rhamzeh opened this issue May 22, 2023 · 0 comments
Labels
enhancement New feature or request needs research

Comments

@rhamzeh
Copy link
Member

rhamzeh commented May 22, 2023

Currently, the axios dependency causes issues when attempting to run the SDK from Deno

Deno 1.41.1
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> import {OpenFgaClient} from "https://dev.jspm.io/@openfga/sdk"
undefined
> const fgaClient = new OpenFgaClient({ apiUrl: "https://api.playground.fga.dev" })
undefined
> fgaClient.createStore({ name: "test-deno-store" })
Promise {
  <rejected> AxiosError: There is no suitable adapter to dispatch the request since :
- adapter xhr is not supported by the environment
- adapter http is not available in the build
    at Object.getAdapter (https://dev.jspm.io/npm:axios@1.6.2!cjs:2123:13)
    at Axios.dispatchRequest (https://dev.jspm.io/npm:axios@1.6.2!cjs:2162:28)
    at Axios.request (https://dev.jspm.io/npm:axios@1.6.2!cjs:2470:33)
    at wrap (https://dev.jspm.io/npm:axios@1.6.2!cjs:8:15)
    at https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:675:24
    at Generator.next (<anonymous>)
    at https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:572:69
    at new Promise (<anonymous>)
    at __awaiter (https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:554:12)
    at attemptHttpRequest (https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:670:12) {
    name: "FgaApiError",
    statusCode: undefined,
    statusText: undefined,
    requestData: undefined,
    requestURL: undefined,
    method: undefined,
    storeId: "",
    endpointCategory: "",
    apiErrorMessage: undefined,
    responseData: undefined,
    responseHeader: undefined,
    requestId: undefined
  }
}
Uncaught AxiosError: There is no suitable adapter to dispatch the request since :
- adapter xhr is not supported by the environment
- adapter http is not available in the build
    at Object.getAdapter (https://dev.jspm.io/npm:axios@1.6.2!cjs:2123:13)
    at Axios.dispatchRequest (https://dev.jspm.io/npm:axios@1.6.2!cjs:2162:28)
    at Axios.request (https://dev.jspm.io/npm:axios@1.6.2!cjs:2470:33)
    at wrap (https://dev.jspm.io/npm:axios@1.6.2!cjs:8:15)
    at https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:675:24
    at Generator.next (<anonymous>)
    at https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:572:69
    at new Promise (<anonymous>)
    at __awaiter (https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:554:12)
    at attemptHttpRequest (https://dev.jspm.io/npm:@openfga/sdk@0.2.10/_/F1S5_afg.js:670:12)
@rhamzeh rhamzeh added the enhancement New feature or request label May 22, 2023
@rhamzeh rhamzeh moved this to Backlog in SDKs and Tooling Feb 9, 2024
@rhamzeh rhamzeh added this to the Javascript SDK Modernization milestone Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs research
Projects
Status: Backlog
Development

No branches or pull requests

1 participant