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

SDK doesn't work in Svelte #144

Open
flossypurse opened this issue Sep 5, 2024 · 1 comment
Open

SDK doesn't work in Svelte #144

flossypurse opened this issue Sep 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@flossypurse
Copy link
Contributor

Expected Behavior

Be able to use resonate.run in a frontend framework like svelte

Actual Behavior

Get this error:

root.svelte:46 [HMR][Svelte] Unrecoverable HMR error in <+page>: next update will trigger a full reload
logError @ proxy.js?v=b3c1e33b:15
Proxy<+page> @ proxy.js?v=b3c1e33b:380
construct_svelte_component_dev @ chunk-HVWGMSDJ.js?v=b3c1e33b:2569
create_default_slot @ root.svelte:46
create_slot @ chunk-HVWGMSDJ.js?v=b3c1e33b:99
create_fragment @ +layout.svelte:2
init @ chunk-HVWGMSDJ.js?v=b3c1e33b:2148
Layout @ +layout.svelte:8
createProxiedComponent @ svelte-hooks.js?v=b3c1e33b:341
ProxyComponent @ proxy.js?v=b3c1e33b:242
Proxy<+layout> @ proxy.js?v=b3c1e33b:349
construct_svelte_component_dev @ chunk-HVWGMSDJ.js?v=b3c1e33b:2569
create_if_block_2 @ root.svelte:45
create_fragment @ root.svelte:43
init @ chunk-HVWGMSDJ.js?v=b3c1e33b:2148
Root @ root.svelte:21
createProxiedComponent @ svelte-hooks.js?v=b3c1e33b:341
ProxyComponent @ proxy.js?v=b3c1e33b:242
Proxy<Root> @ proxy.js?v=b3c1e33b:349
initialize @ client.js?v=b3c1e33b:434
_hydrate @ client.js?v=b3c1e33b:2388
await in _hydrate
start @ client.js?v=b3c1e33b:293
(anonymous) @ (index):30
Promise.then
(anonymous) @ (index):29
Show 16 more frames
Show lessUnderstand this error
@resonatehq_sdk.js?v=b3c1e33b:139 Uncaught (in promise) ReferenceError: process is not defined
    at new Logger (@resonatehq_sdk.js?v=b3c1e33b:139:31)
    at new Resonate (@resonatehq_sdk.js?v=b3c1e33b:9315:18)
    at instance (+page.svelte:19:17)
    at init (chunk-HVWGMSDJ.js?v=b3c1e33b:2137:23)
    at new Page (+page.svelte:96:57)
    at createProxiedComponent (svelte-hooks.js?v=b3c1e33b:341:9)
    at new ProxyComponent (proxy.js?v=b3c1e33b:242:7)
    at new Proxy<+page> (proxy.js?v=b3c1e33b:349:11)
    at construct_svelte_component_dev (chunk-HVWGMSDJ.js?v=b3c1e33b:2569:22)
    at Array.create_default_slot (root.svelte:46:82)

To Reproduce

create a svelte kit project.
add:

 import { Resonate, Context } from "@resonatehq/sdk";
// ...
  const resonate = new Resonate();
  resonate.register("func", fun, { timeout: 1000, version: 1 });
  resonate.start();
 resonate.run(func, "id", args);

@flossypurse flossypurse added the bug Something isn't working label Sep 5, 2024
@avillega
Copy link
Contributor

Making this a enhancement instead of a bug. Right now we haven't make a path for using resonate in the browser at all for none of the frameworks.

@avillega avillega added enhancement New feature or request and removed bug Something isn't working labels Sep 25, 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
Projects
None yet
Development

No branches or pull requests

2 participants