-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Named export '__awaiter' not found #487
Comments
I found some information in the nuxt documentation link. I have overcome the error for now without manually making changes to the module files. I will reference the following |
Just for the record, #341 caused this error. |
@Meierschlumpf helped me with ajnart/homarr#1016 . Now working again for our project. |
I'm having this issue with SvelteKit is there any fix for it? |
This comment has been minimized.
This comment has been minimized.
As I commented previously this library only ships as an ES module. If you are working in an ecosystem that does not support ES modules, you may need to have a build step to convert the library to a compatible module format. I am curious if distributing |
According to the SvelteKit docs, it seems they do support ESM but only when It doesn't seem In dev mode, Vite actually suggests importing using the following. I wonder if this would work as a workaround, but I'm not exactly sure how to change it given that the import for import pkg from '../node_modules/tslib/tslib.es6.js';
const { __awaiter } = pkg; |
Any updates on this? I've not found a way around it. From my perspective the Jellyfin SDK is being published as an ES module with a transient dependancy which is a CJS module. (at least this is how Vite sees it). tslib seems to have no intention of bundling their library as an ES module for compatibility reasons which leaves this SDK in an unusable state for myself and others. I'm just going to either not use the SDK or copy the source files across directly but obviously neither of these solutions are ideal |
For what it's worth I found a middle ground solution which is good-enough for me it's probably dumb but hopefully someone else might find it useful too. I created a package patch where I defined the The contents of the patch file: new file mode 100644
index 0000000..1632c2c
--- /dev/null
+++ b/node_modules/@jellyfin/sdk/lib/node_modules/tslib/package.json
@@ -0,0 +1 @@
+{"type": "module"}
\ No newline at end of file |
This should be fixed in the next release, but if you would like to confirm before then, you can test the latest Update: I've confirmed the issue is fixed for jest in jellyfin-expo at least. |
I have started a project built on nuxt 3.3.1, added the @jellyfin/sdk library to handle user Auth and future api requests.
Has anyone had any experience using this stack, is the below a bug or a error on my side?
The login end point authenticateUserByName() is working and in response giving me the AccessToken. However there's an issue with specifically, the awaiter function in this library is not working properly with Nuxt.
As a result, i have had to manually make changes to the Node.js module files in order to get the library to work.
The text was updated successfully, but these errors were encountered: