You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue like this
`Starting compilation in watch mode...
node_modules/langchain/dist/document_loaders/fs/buffer.d.ts:1:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
1 ///
node_modules/langchain/dist/document_loaders/fs/buffer.d.ts:2:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
2 ///
node_modules/langchain/dist/document_loaders/fs/directory.d.ts:1:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
1 ///
node_modules/langchain/dist/document_loaders/fs/directory.d.ts:2:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
2 ///
node_modules/langchain/dist/document_loaders/fs/pdf.d.ts:1:22 - error TS6053: File 'C:/Users/CibusCell/Desktop/work/cibuscell-dashboard-api/node_modules/langchain/src/types/pdf-parse.d.ts' not found.
1 ///
node_modules/langchain/dist/document_loaders/fs/pdf.d.ts:2:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
2 ///
~~~~
node_modules/langchain/dist/document_loaders/fs/pdf.d.ts:15:32 - error TS2307: Cannot find module 'pdf-parse/lib/pdf.js/v1.10.100/build/pdf.js' or its corresponding type declarations.
15 getDocument: typeof import("pdf-parse/lib/pdf.js/v1.10.100/build/pdf.js").getDocument;
node_modules/langchain/dist/document_loaders/fs/text.d.ts:1:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
1 ///
node_modules/langchain/dist/embeddings/cohere.d.ts:50:31 - error TS2307: Cannot find module 'cohere-ai' or its corresponding type declarations.
50 cohere: typeof import("cohere-ai");
node_modules/langchain/dist/llms/cohere.d.ts:31:31 - error TS2307: Cannot find module 'cohere-ai' or its corresponding type declarations.
31 cohere: typeof import("cohere-ai");
node_modules/langchain/dist/llms/hf.d.ts:37:36 - error TS2307: Cannot find module '@huggingface/inference' or its corresponding type declarations.
37 HfInference: typeof import("@huggingface/inference").HfInference;
node_modules/langchain/dist/llms/replicate.d.ts:23:34 - error TS2307: Cannot find module 'replicate' or its corresponding type declarations.
23 Replicate: typeof import("replicate").default;
node_modules/langchain/dist/vectorstores/chroma.d.ts:1:64 - error TS2307: Cannot find module 'chromadb' or its corresponding type declarations.
1 import type { ChromaClient as ChromaClientT, Collection } from "chromadb";
~~~~~~~~~~
node_modules/langchain/dist/vectorstores/chroma.d.ts:2:28 - error TS2307: Cannot find module 'chromadb/dist/main/types.js' or its corresponding type declarations.
2 import type { Where } from "chromadb/dist/main/types.js";
node_modules/langchain/dist/vectorstores/pinecone.d.ts:5:46 - error TS2307: Cannot find module '@pinecone-database/pinecone' or its corresponding type declarations.
5 type VectorOperationsApi = ReturnType<import("@pinecone-database/pinecone").PineconeClient["Index"]>;
node_modules/langchain/dist/vectorstores/supabase.d.ts:1:37 - error TS2307: Cannot find module '@supabase/supabase-js' or its corresponding type declarations.
1 import type { SupabaseClient } from "@supabase/supabase-js";
~~~~~~~~~~~~~~~~~~~~~~~
node_modules/langchain/dist/vectorstores/supabase.d.ts:2:45 - error TS2307: Cannot find module '@supabase/postgrest-js' or its corresponding type declarations.
2 import type { PostgrestFilterBuilder } from "@supabase/postgrest-js";
~~~~~~~~~~~~~~~~~~~~~~~~
My tsconfig.json is {
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2017",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
}
}
`
Any idea how to resolve this???
The text was updated successfully, but these errors were encountered:
dosubotbot
added
the
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
label
Oct 11, 2023
The errors you're encountering seem to be related to the TypeScript configuration and missing dependencies in your project. Here are some steps you can take to resolve these issues:
Update your TypeScript configuration: The 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext. You can add "moduleResolution": "node16" to your tsconfig.json file.
Install missing dependencies: The errors indicate that certain modules cannot be found. These modules are likely peer dependencies of langchainjs that need to be installed separately. You can install these dependencies using npm or yarn. For example:
Skip library type checking: You can add "skipLibCheck": true to your tsconfig.json file. This will skip type checking of all declaration files (*.d.ts).
Ensure you have the latest version of langchainjs installed: Uninstall the current version using npm uninstall langchain and then reinstall it using npm install -S langchain.
Use Yarn for dependency management: The langchainjs project is configured to use Yarn as its package manager. If you're not already using Yarn, you can install it with npm install -g yarn and then run yarn install to install the project dependencies.
Ensure you're using the correct Node.js version: The minimum required version of Node.js for the langchainjs repository is 20. You can check your Node.js version with node -v and update it if necessary.
Please try these steps and let me know if you're still encountering issues.
@dosu-bot
I have an issue like this
`Starting compilation in watch mode...
node_modules/langchain/dist/document_loaders/fs/buffer.d.ts:1:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
1 ///
node_modules/langchain/dist/document_loaders/fs/directory.d.ts:1:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
1 ///
node_modules/langchain/dist/document_loaders/fs/pdf.d.ts:1:22 - error TS6053: File 'C:/Users/CibusCell/Desktop/work/cibuscell-dashboard-api/node_modules/langchain/src/types/pdf-parse.d.ts' not found.
1 ///
node_modules/langchain/dist/document_loaders/fs/text.d.ts:1:23 - error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.
1 ///
node_modules/langchain/dist/llms/cohere.d.ts:31:31 - error TS2307: Cannot find module 'cohere-ai' or its corresponding type declarations.
31 cohere: typeof import("cohere-ai");
node_modules/langchain/dist/llms/replicate.d.ts:23:34 - error TS2307: Cannot find module 'replicate' or its corresponding type declarations.
23 Replicate: typeof import("replicate").default;
node_modules/langchain/dist/vectorstores/pinecone.d.ts:5:46 - error TS2307: Cannot find module '@pinecone-database/pinecone' or its corresponding type declarations.
5 type VectorOperationsApi = ReturnType<import("@pinecone-database/pinecone").PineconeClient["Index"]>;
The text was updated successfully, but these errors were encountered: