[GH-ISSUE #1212] Cannot find module '@langchain/community/vectorstores/pgvector' or its corresponding type declarations. #170

Closed
opened 2026-02-17 17:19:19 -05:00 by yindo · 1 comment
Owner

Originally created by @07-jay on GitHub (Oct 31, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/1212

versions using:
"@langchain/community": "^1.0.0",
"@langchain/core": "^0.3.72",

In a .ts file,
getting a typescript error:
Cannot find module '@langchain/community/vectorstores/pgvector' or its corresponding type declarations.

It is working for '@langchain/community/dist/vectorstores/pgvector'.
But not mentioned in docs.

code line:
import { PGVectorStore, DistanceStrategy } from '@langchain/community/vectorstores/pgvector';

error after hovering:
Cannot find module '@langchain/community/vectorstores/pgvector' or its corresponding type declarations.
There are types at 'c:/Projects/chatwoot/chatwoot-monorepo/node_modules/@langchain/community/dist/vectorstores/pgvector.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.ts(2307)

Originally created by @07-jay on GitHub (Oct 31, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/1212 versions using: "@langchain/community": "^1.0.0", "@langchain/core": "^0.3.72", In a .ts file, getting a typescript error: Cannot find module '@langchain/community/vectorstores/pgvector' or its corresponding type declarations. It is working for '@langchain/community/dist/vectorstores/pgvector'. But not mentioned in docs. code line: import { PGVectorStore, DistanceStrategy } from '@langchain/community/vectorstores/pgvector'; error after hovering: Cannot find module '@langchain/community/vectorstores/pgvector' or its corresponding type declarations. There are types at 'c:/Projects/chatwoot/chatwoot-monorepo/node_modules/@langchain/community/dist/vectorstores/pgvector.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.ts(2307)
yindo closed this issue 2026-02-17 17:19:19 -05:00
Author
Owner

@mdrxy commented on GitHub (Oct 31, 2025):

The import @langchain/community/vectorstores/pgvector is correct and properly exported. Your current TypeScript configuration may be using an older module resolution strategy that doesn't understand the package.json exports field.

@mdrxy commented on GitHub (Oct 31, 2025): The import `@langchain/community/vectorstores/pgvector` is correct and properly exported. Your current TypeScript configuration may be using an older module resolution strategy that doesn't understand the `package.json` exports field.
yindo changed title from Cannot find module '@langchain/community/vectorstores/pgvector' or its corresponding type declarations. to [GH-ISSUE #1212] Cannot find module '@langchain/community/vectorstores/pgvector' or its corresponding type declarations. 2026-06-05 17:25:26 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#170