-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
chore: Fix top-level dependency install for node 22+ #6658
chore: Fix top-level dependency install for node 22+ #6658
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependency is in the resolutions
field, which means it's not actually a top level dependency, but rather it'll force all workspaces which have better-sqlite3
as a dependency to use that specified version.
I think if this PR passes CI it should be good to go since resolutions
in this instance is for development and not released code, but cc @jacoblee93 incase I'm missing something.
Damn @bracesproul you're quick today! Thanks for chiming in! |
@bracesproul on further consideration, my change is effectively rendering the |
67298b9
to
4a1703d
Compare
No, |
Ah, I see - and sorry for the confusion on my part. I'm quite familiar with node package management via
If what you said above is true, that the top-level Assuming that this is considering the full dependency tree (command ran from repo root), I don't see any usages of
|
Thanks @benjamincburns, will look into this. |
@jacoblee93 is attempting to deploy a commit to the LangChain Team on Vercel. A member of the Team first needs to authorize it. |
Thanks again @benjamincburns, yeah I think my initial PR was a quick fix to an acute problem (conflicting peer deps on Thanks for flagging! |
@jacoblee93 thanks! In case you missed it, however - FWIW, WiseLibs/better-sqlite3#1182 is the PR where they implemented support. It looks like it was just changes to their underlying build config - not seeing any logic changes, anyway. It's probably fine to leave as-is with v9.5.0, but I haven't looked thoroughly enough to say that with confidence. |
Prior to this change, running
yarn
in the top-level directory of the repo failed on node >= v22. After this change, it succeeds.This was cased by the version of the
better-sqlite3
package being pinned to 9.4.0 in the top-levelpackage.json
. This change was introduced by @jacoblee93 in #5694. It's not clear from that PR why he added the package to the top-levelpackage.json
(I can't find anything that references it in the top-level), or why he pinned it to that specific version. Perhaps he could chime in here.Edit: I updated this change to remove the range definition from the top-level
resolutions
object, as my initial change would've had the same effect, but with the caveat that it'd need to be maintained in step with the version ofbetter-sqlite3
defined in the community package.Rather than removing it, my change aligns the version range with one in the @langchain/community package (listed here as a devDependency and here as an optional peerDependency), which is the only other package in the repo that depends onbetter-sqlite3
.