Closed rainx0r closed 8 months ago
@evangelos-ch Hello, were you finally able to get the client running on Vite? We are evaluating potential notification services, and our frontend project is based on Vue/Vite. Thanks
@evangelos-ch Hello, were you finally able to get the client running on Vite? We are evaluating potential notification services, and our frontend project is based on Vue/Vite. Thanks
Hi Luis! Nope, I never really ended up getting it working, I deferred the implementation of the notification system hoping I would get a response here or something in the meantime. Then a few months later I shelved my project for various reasons so I ended up not fiddling with it in the end.
The commit history doesn't seem to suggest that this is fixed yet though, so I wouldn't bet on it working now, but who knows.
This should be fixed by #22
I still have this problem in a SvelteKit app. It seems this fix: https://github.com/knocklabs/javascript/commit/59ce04400058e7d08925a20f925e80c1760e23e0 has been merged to @knocklabs/react but not to @knocklabs/client.
Can you please merge it to @knocklabs/client and see if that resolves it?
@patrikengborg Working through a fix now, will update you here when it's released.
@patrikengborg v0.1.9 is now available and should fix the issues that you are seeing: https://www.npmjs.com/package/@knocklabs/react/v/0.1.9
It works! Great job, thanks a lot!
Hi!
I'm working on a hobby project written in SvelteKit hosted on Vercel, and I'm looking for a notification solution. After seeing Vercel's blogpost giving Knock a glowing recommendation I decided to try and integrate it into my app, however the client just does not seem to initialise. Might be a problem when running under Vite (the bundler Svelte uses)?
This is the code I have in a utility file:
And even just this fails to run with the following stack trace:
Obviously I stubbed out my actual file paths in the above error snippet for privacy reasons.
I was also getting a warning about needing
"type": "module"
in thepackage.json
file for the Knock client, which I put in myself locally to see if it made any difference and it made the warning go away but it did not fix the problem, it still errors out and doesn't work.Would be great if you could look into this! Though seeing how the client documentation is somewhat out of date with the actual API and a few months old stale issues in this repo I assume this client is not at the top of your priorities... Pity, as it looks like a great solution for my use case!