-
-
Notifications
You must be signed in to change notification settings - Fork 168
fix(Imports): resolve circular dependency #1898
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
base: main
Are you sure you want to change the base?
fix(Imports): resolve circular dependency #1898
Conversation
🦋 Changeset detectedLatest commit: 3291db5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
I'm not sure what might be the root cause, but I encounter this issue with versions beyond |
This may be related to the |
|
We could move those outside somewhere as well if needed @ap0nia |
Yes. I was indicating that the root cause of the circular dependency is unclear. Which module is being circularly imported? This pull request assumes that this line causes it. import { IsUsingKeyboard } from "$lib/index.js";However, this was in the library in version The pull request fixes a line of code that might be a red herring for the actual root cause of the circular dependency, given that the library worked fine for me with original line of code. It may also be possible that both of these lines, as well as additional ones, are collectively causing issues. |
This PR fixes a circular SSR import issue that caused the error:
Error when evaluating SSR "path/to/file" Cannot read properties of undefined (reading 'Root')The error occurred when internal components imported IsUsingKeyboard from the library’s barrel file ($lib/index.js).
The barrel re-exports all components, creating a circular dependency during SSR evaluation. Switching to a direct import resolves the issue.