Cannot find module '@llamaindex/env/type' #577
-
Working on a typescript project and encountered this error when trying to use the example from docs: `import { HuggingFaceEmbedding, serviceContextFromDefaults } from "llamaindex"; const huggingFaceEmbeds = new HuggingFaceEmbedding(); const serviceContext = serviceContextFromDefaults({ embedModel: openaiEmbeds }); const document = new Document({ text: essay, id_: "essay" }); const index = await VectorStoreIndex.fromDocuments([document], { const queryEngine = index.asQueryEngine(); const query = "What is the meaning of life?"; const results = await queryEngine.query({ **_error TS2307: Cannot find module '@llamaindex/env/type' or its corresponding type declarations. 1 import type { GenericFileSystem } from "@llamaindex/env/type";_** |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
What's your ts-config settings? |
Beta Was this translation helpful? Give feedback.
-
I would suggest you to change moduleResolution to "bundler" |
Beta Was this translation helpful? Give feedback.
This could help #578