Error loading "langsmith" package with the simplest langchain 1.0.1 scaffold #372

Closed
opened 2026-02-15 18:16:18 -05:00 by yindo · 1 comment
Owner

Originally created by @ddewaele on GitHub (Oct 23, 2025).

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangGraph.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangGraph.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package).

Example Code

package.json

{
  "name": "langgraphjs-v1",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "type": "module",
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "langchain": "^1.0.1",
    "langsmith": "^0.3.74"
  }
}

code

import * as hub from "langchain/hub";
import { Client } from "langsmith";

const prompt = await hub.pull("test-mustache-format",{
    includeModel: false,
});

Error Message and Stack Trace (if applicable)

Error: Error loading "langsmith" package, install it via `npm install langsmith` before you use this function.
Error: (0 , import_range.require_range) is not a function
    at loadLangSmith (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/node_modules/.pnpm/langchain@1.0.1_@langchain+core@1.0.1/node_modules/langchain/dist/hub/base.js:102:9)
    at async basePull (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/node_modules/.pnpm/langchain@1.0.1_@langchain+core@1.0.1/node_modules/langchain/dist/hub/base.js:24:17)
    at async Module.pull (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/node_modules/.pnpm/langchain@1.0.1_@langchain+core@1.0.1/node_modules/langchain/src/hub/index.ts:40:24)
    at async <anonymous> (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/index.ts:4:16)

Node.js v20.17.0

Description

Expected these 5 lines of code to work with 1.0.1
Works fine with

  "dependencies": {
    "@langchain/core": "0.3.72",
    "langchain": "0.3.36"
  }

System Info

OS : Mac
Node v20
Package manager npm

Originally created by @ddewaele on GitHub (Oct 23, 2025). ### Checked other resources - [x] I added a very descriptive title to this issue. - [x] I searched the LangGraph.js documentation with the integrated search. - [x] I used the GitHub search to find a similar question and didn't find it. - [x] I am sure that this is a bug in LangGraph.js rather than my code. - [x] The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package). ### Example Code package.json ``` { "name": "langgraphjs-v1", "version": "1.0.0", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "type": "module", "author": "", "license": "ISC", "description": "", "dependencies": { "langchain": "^1.0.1", "langsmith": "^0.3.74" } } ``` code ``` import * as hub from "langchain/hub"; import { Client } from "langsmith"; const prompt = await hub.pull("test-mustache-format",{ includeModel: false, }); ``` ### Error Message and Stack Trace (if applicable) ``` Error: Error loading "langsmith" package, install it via `npm install langsmith` before you use this function. Error: (0 , import_range.require_range) is not a function at loadLangSmith (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/node_modules/.pnpm/langchain@1.0.1_@langchain+core@1.0.1/node_modules/langchain/dist/hub/base.js:102:9) at async basePull (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/node_modules/.pnpm/langchain@1.0.1_@langchain+core@1.0.1/node_modules/langchain/dist/hub/base.js:24:17) at async Module.pull (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/node_modules/.pnpm/langchain@1.0.1_@langchain+core@1.0.1/node_modules/langchain/src/hub/index.ts:40:24) at async <anonymous> (/Users/davydewaele/Projects/AgenticAI/langgraph-tutorial/langgraphjs-v1/index.ts:4:16) Node.js v20.17.0 ``` ### Description Expected these 5 lines of code to work with 1.0.1 Works fine with ``` "dependencies": { "@langchain/core": "0.3.72", "langchain": "0.3.36" } ``` ### System Info OS : Mac Node v20 Package manager npm
yindo closed this issue 2026-02-15 18:16:18 -05:00
Author
Owner

@ddewaele commented on GitHub (Oct 23, 2025):

Moved the issue to https://github.com/langchain-ai/langchainjs/issues/9257

@ddewaele commented on GitHub (Oct 23, 2025): Moved the issue to https://github.com/langchain-ai/langchainjs/issues/9257
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#372