JS SDK (Bundling)
Hey guys, just started tinkering with langfuse, loving the idea!
I have a quick question, I am using LangchainJS on my node backend, and typescript is complaining about the CallbackHandler type
If i peek into the node_modules source code I see it extends the base class, so i dont really know why. any idea please?
for now i can silent the error in multiple ways ofc, just wondering if someone else ran into this issue and have solution.
14 Replies
HI @faileon, sorry for the inconvenience and thanks for reporting. We know that depending on the Langchain version, the integration leads to typing issues due to the current bundling. This will be resolved by this PR: https://github.com/langfuse/langfuse-js/pull/46
GitHub
Updated module exports for ESM by ksjogo · Pull Request #46 · langf...
Problem
Changes
Release info Sub-libraries affected
Bump level
Major
Minor
Patch
Libraries affected
All of them
langfuse
langfuse-node
Changelog notes
Added support for X
Splendid, thanks for the quick reply, looking forward to the PR then 👍
Can you share your package.json and tsconfig?
sure, gotta do screenshots tho. discord wont let me upload large texts
Hi all, we made major changes to the bundling of the SDK. It supports node versions >=16. The alpha version for this release is
langfuse@2.0.0-alpha.1
. I'd be happy to get some feedback whether this works for youAmazing thank you, I tried switching to
"langfuse-langchain": "^2.0.0-alpha.1"
and typescript is now happy and so am I because i dont have to cast it to any
anymore :]Great! @faileon
Will release it soon with docs as it has a breaking change (dropping support for certain es and Node versions)
Is it node 20 and above only now?
The new version supports >= Node16
hey i know this is an ancient thread, but does the latest SDK work in Node 16? I'm getting a
ReferenceError: Blob is not defined
in langfuse-core/src/index.ts:486:26
which suggests it requires some 18 features. any quick workarounds?Did you try langfuse node?
npm
langfuse-node
!GitHub Banner. Latest version: 3.11.2, last published: 16 days ago. Start using langfuse-node in your project by running
npm i langfuse-node
. There are no other projects in the npm registry using langfuse-node.ah looks like that worked, and traces are populated, but still getting that Blob is not defined error in the logs
Would love to have a look together. Can we hop on a call for 5 minutes? https://cal.com/marc-kl/5