-
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
ReferenceError Function.assign(<anonymous>): RunTree is not defined #7546
Comments
The error "ReferenceError: RunTree is not defined" suggests that there might be an issue with the Given that you're using Node.js version 22, which is not officially supported by LangChain.js (as it supports Node.js versions 18.x to 20.x), this could be a compatibility issue. You might want to try using a supported Node.js version to see if that resolves the issue. Additionally, ensure that all dependencies are correctly installed and compatible with LangChain.js version 0.3.11. You can verify the dependencies listed in the If the issue persists after these checks, it might be worth investigating if there are any specific changes in the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Strange - any other context/sample code you can give? |
This seems to be a package ecosystem version issue.
However when upgrading to the latest versions, this issue appeared. Pretty strange, it stopped the app from starting. Interesting to note that the building wasn't the issue. {
"extends": "fastify-tsconfig",
"compilerOptions": {
"outDir": "dist",
"sourceMap": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"module": "ESNext",
"moduleResolution": "Bundler",
"target": "ESNext",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"isolatedModules": true,
"resolveJsonModule": true,
"strict": true,
"inlineSources": true,
// Set `sourceRoot` to "/" to strip the build path prefix
// from generated source code references.
// This improves issue grouping in Sentry.
"sourceRoot": "/"
},
"include": ["src/**/*", "test/**/*"],
"exclude": ["node_modules"]
} Maybe @dosu could be of help? |
The "ReferenceError: RunTree is not defined" issue you're encountering might be due to changes in the import path for the import { RunTree } from "langsmith"; Ensure that your code is using this import path. If your code was previously using a different path, such as To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Maybe try removing langfuse and seeing what happens? They might be using |
same here |
Also getting this issue, very specifically when adding this opentelemetry instrumentation hook line (the last line in this command):
Relevant documentation here: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/esm-support.md#instrumentation-hook-required-for-esm |
Checked other resources
Example Code
The code isn't the issue, I believe there's an underlying issue in the dependencies or an incompatibility with the node version.
Error Message and Stack Trace (if applicable)
Description
System Info
➜ pnpm info langchain
[email protected] | MIT | deps: 12 | versions: 306
Typescript bindings for langchain
https://github.com/langchain-ai/langchainjs/tree/main/langchain/
keywords: llm, ai, gpt3, chain, prompt, prompt engineering, chatgpt, machine learning, ml, openai, embeddings, vectorstores
dist
.tarball: https://registry.npmjs.org/langchain/-/langchain-0.3.11.tgz
.shasum: dbfadf47aaffc23fc0ac80c953c41fe8176614c9
.integrity: sha512-PgAG4ZLeuSRkKsyf98cmWGdwKv3I1hOFC8a4fr7e+bm7E+F6Fx6xUkgbuC78ff0N/Cjs5BBryZIFMrqoKPqsvg==
.unpackedSize: 2.9 MB
dependencies:
@langchain/openai: >=0.1.0 <0.4.0 jsonpointer: ^5.0.1 uuid: ^10.0.0
@langchain/textsplitters: >=0.0.0 <0.2.0 langsmith: ^0.2.8 yaml: ^2.2.1
js-tiktoken: ^1.0.12 openapi-types: ^12.1.3 zod-to-json-schema: ^3.22.3
js-yaml: ^4.1.0 p-retry: 4 zod: ^3.22.4
maintainers:
dist-tags:
latest: 0.3.11 tag-for-publishing-older-releases: 0.2.20
next: 0.3.2-rc.0
published a week ago by jacoblee93 [email protected]
node version: 22
platform: linux
The text was updated successfully, but these errors were encountered: