-
Notifications
You must be signed in to change notification settings - Fork 404
Description
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
// import { RedisStore } from '@langchain/langgraph-checkpoint-redis/dist/store'; // FIXES TS IMPORT BUT DOESNT RUN
import { RedisStore } from "@langchain/langgraph-checkpoint-redis/store"; // ACTUAL DIRECTIVE FROM LIBRARY README BUT APP DOESNT RUN
// import { RedisStore } from '@langchain/langgraph-checkpoint-redis/dist/store.cjs'; // FIXES TS IMPORT BUT DOESNT RUN
Error Message and Stack Trace (if applicable)
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/store' is not defined by "exports" in C:\Users\Efosa\Desktop\nextgrade-backend\node_modules@langchain\langgraph-checkpoint-redis\package.json
at exportsNotFound (node:internal/modules/esm/resolve:314:10)
at packageExportsResolve (node:internal/modules/esm/resolve:661:9)
at resolveExports (node:internal/modules/cjs/loader:657:36)
at Function._findPath (node:internal/modules/cjs/loader:749:31)
at Function._resolveFilename (node:internal/modules/cjs/loader:1387:27)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v22.15.0
...
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/store.cjs' is not defined by "exports" in C:\Users\Efosa\Desktop\nextgrade-backend\node_modules@langchain\langgraph-checkpoint-redis\package.json
at exportsNotFound (node:internal/modules/esm/resolve:314:10)
at packageExportsResolve (node:internal/modules/esm/resolve:661:9)
at resolveExports (node:internal/modules/cjs/loader:657:36)
at Function._findPath (node:internal/modules/cjs/loader:749:31)
at Function._resolveFilename (node:internal/modules/cjs/loader:1387:27)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v22.15.0
Using the actual import directive from the libray ReadME
Cannot find module '@langchain/langgraph-checkpoint-redis/store' or its corresponding type declarations.
There are types at 'c:/Users/Efosa/Desktop/nextgrade-backend/node_modules/@langchain/langgraph-checkpoint-redis/dist/store.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
Description
I am trying to use your library to implement a RedisStore but the library doesnt export the Class, The various workarounds also didnt work.
Proposed Solution
Update the package.json exports field in @langchain/langgraph-checkpoint-redis:
{
"exports": {
".": "./dist/index.js",
"./store": "./dist/store.cjs",
"./shallow": "./dist/shallow.cjs"
}
}
or add it to the index file where I only see the RedisSaver
System Info
Node version: v22.15.0
Operating system: win32 x64
Package manager: npm
Package manager version: N/A
@langchain/core -> @1.1.8, , @"^1.1.8", @"1.1.8", @"^1.0.1"
langsmith -> @0.4.2, , @">=0.4.0
zod -> @4.3.4, , @"^4.3.4", @"^3.25.76, @"^3.25.32
@langchain/google-genai -> @2.1.3, , @"^2.1.3"
@langchain/langgraph-checkpoint-postgres -> @1.0.0, , @"^1.0.0"
@langchain/langgraph-checkpoint -> @1.0.0, , @"^1.0.0"
@langchain/langgraph-checkpoint-redis -> @1.0.1, , @"^1.0.1"
langchain -> @1.2.3, , @"^1.2.3"
@langchain/langgraph -> @1.0.7, , @"^1.0.0"
@langchain/langgraph-sdk -> @1.3.1, , @"~1.3.1"