Suddenly plex integration stopped working
This has been working flawlessly so far but now suddenly it stopped working.
Double checked URL
Double checked plex token
Not sure what is wrong here
Log (This keeps coming up):
2023-06-05T16:59:05.006507663Z file:///app/node_modules/@jellyfin/sdk/lib/generated-client/common.js:1
2023-06-05T16:59:05.006576072Z import { awaiter } from '../node_modules/tslib/tslib.es6.js';
2023-06-05T16:59:05.006623049Z ^^^^^^^^^
2023-06-05T16:59:05.006636139Z SyntaxError: Named export 'awaiter' not found. The requested module '../node_modules/tslib/tslib.es6.js' is a CommonJS module, which may not support all module.exports as named exports.
2023-06-05T16:59:05.006649078Z CommonJS modules can always be imported via the default export, for example using:
2023-06-05T16:59:05.006660812Z
2023-06-05T16:59:05.006672008Z import pkg from '../node_modules/tslib/tslib.es6.js';
2023-06-05T16:59:05.006683268Z const { __awaiter } = pkg;
2023-06-05T16:59:05.006694792Z
2023-06-05T16:59:05.006705605Z at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
2023-06-05T16:59:05.006717238Z at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
2023-06-05T16:59:05.006728515Z at async Promise.all (index 0)
2023-06-05T16:59:05.006739205Z at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
2023-06-05T16:59:05.006750238Z at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
17 Replies
Oh no
Might be an issue with the current sdk, we updated to 0.8.0 3 days ago
GitHub
⬆️ Update dependency @jellyfin/sdk to ^0.8.0 by renovate[bot] · Pul...
This PR contains the following updates:
Package
Change
Age
Adoption
Passing
Confidence
@jellyfin/sdk
^0.7.0 -> ^0.8.0
Release Notes
jellyfin/jellyfin-sdk-typescript
v0.8.2
Compar...
Seems like ESM issues
Yes, 100%
Why did you merge it, @ajnart ?
Oh I forgot to block the merge.... my bad...
I wanted to block it, since the sdk migrated to ESM only. @meierschlumpf does Nextjs already support ESM?
I'm not sure
Maybe that will help:
https://www.codeconcisely.com/posts/nextjs-esm/
Using ESM in Next.js - Code Concisely
Next.js has great ES modules support of out box. But some scripts might still use CommonJS. Learn how to set up your Next.js project to always use ESM.
Don't we have to use anyc imports?
Or nevermind, if NextJs actually supports ESM modules, we don't have to luckily
I'm not sure
ok nice
@spillebulle can you create an issue for it, that we make Homarr compatible with ESM, so future ESM updates will go without problems?
GitHub
Suddenly plex integration stopped working (Make Homarr compatible w...
Environment Docker Version 1.12.2 Dev branch Describe the problem This has been working flawlessly so far but now suddenly it stopped working. Double checked URL Double checked plex token Not sure ...
Thanks, we will try our best to fix the issue as soon as possible 😉
Thanks @spillebulle
Big support, very shmood
I think that’s what next/dynamic does. Imo all integrations should have dynamic imports to reduce initial load time
This way it doesn’t load the library unless a widget using that library is present on their config
Does that really resolve ESM loading errors? If you have the time, feel free to try out...
Related to when I saved like 40% of the build size by doing just that with VideoJS. It’s kind of like a function that imports stuff
Optimizing: Lazy Loading
Lazy load imported libraries and React Components to improve your application's loading performance.