Module '"llamaindex"' has no exported member 'Document'. (and Metadata) #239

Closed
opened 2026-02-15 20:15:34 -05:00 by yindo · 5 comments
Owner

Originally created by @zepedroc on GitHub (Aug 28, 2024).

When updating to version 0.4.6, I started having a Typescript error saying that Document and Metadata are not being exported from 'llamaindex' module.
On version 0.4.5 everything is fine.
We're using version 5.1.6 of Typescript, in case that's important.

image
image
image

If someone could help that would be great.
We're trying to use gpt-4o-mini but I believe we need version 0.5.6 for that.

Originally created by @zepedroc on GitHub (Aug 28, 2024). When updating to version 0.4.6, I started having a Typescript error saying that **Document** and **Metadata** are not being exported from 'llamaindex' module. On version 0.4.5 everything is fine. We're using version 5.1.6 of Typescript, in case that's important. ![image](https://github.com/user-attachments/assets/6f311fa7-9a74-4f62-b74e-f29b0cec8b26) ![image](https://github.com/user-attachments/assets/f025b29b-4243-4f2a-87cc-f2de2e301978) ![image](https://github.com/user-attachments/assets/01aaf88f-b471-4fe3-a4d3-a78e1f081ff5) If someone could help that would be great. We're trying to use gpt-4o-mini but I believe we need version 0.5.6 for that.
yindo added the question label 2026-02-15 20:15:34 -05:00
yindo closed this issue 2026-02-15 20:15:34 -05:00
Author
Owner

@marcusschiesser commented on GitHub (Aug 30, 2024):

What's wrong with using the latest 0.5.20?

@marcusschiesser commented on GitHub (Aug 30, 2024): What's wrong with using the latest 0.5.20?
Author
Owner

@zepedroc commented on GitHub (Aug 30, 2024):

I have the same problem, only mentioned 0.4.6 so it's easier for you guys to find the potential problem.

My tsconfig.json in case it helps:
image

@zepedroc commented on GitHub (Aug 30, 2024): I have the same problem, only mentioned 0.4.6 so it's easier for you guys to find the potential problem. My tsconfig.json in case it helps: ![image](https://github.com/user-attachments/assets/b4d043a7-13ee-4f0e-86ba-b88963b11a0c)
Author
Owner

@donholly commented on GitHub (Aug 30, 2024):

I am having this same issue with 0.5.20 FWIW. Haven't had much time to debug it yet, but I saw this comment in the change log: https://github.com/run-llama/LlamaIndexTS/blob/2411c9fbd0f371b0a8302327178f4e1cdda3d9f5/packages/llamaindex/CHANGELOG.md?plain=1#L795

I tried playing around with my tsconfig.json and updating moduleResolution to bundler or nodenext, but that introduced other issues with other dependencies in my project.

Happy to provide more details if helpful!

@donholly commented on GitHub (Aug 30, 2024): I am having this same issue with `0.5.20` FWIW. Haven't had much time to debug it yet, but I saw this comment in the change log: https://github.com/run-llama/LlamaIndexTS/blob/2411c9fbd0f371b0a8302327178f4e1cdda3d9f5/packages/llamaindex/CHANGELOG.md?plain=1#L795 I tried playing around with my `tsconfig.json` and updating `moduleResolution` to `bundler` or `nodenext`, but that introduced other issues with other dependencies in my project. Happy to provide more details if helpful!
Author
Owner

@marcusschiesser commented on GitHub (Sep 1, 2024):

Yes, I remember @himself65 recommending using bundler. You might want to base your tsconfig.json on the one from the examples: https://github.com/run-llama/LlamaIndexTS/blob/main/examples/tsconfig.json

@marcusschiesser commented on GitHub (Sep 1, 2024): Yes, I remember @himself65 recommending using `bundler`. You might want to base your `tsconfig.json` on the one from the examples: https://github.com/run-llama/LlamaIndexTS/blob/main/examples/tsconfig.json
Author
Owner

@himself65 commented on GitHub (Sep 3, 2024):

Yeah, please use bundler if you are using like next.js, vite...
use node16 if you are using pure node.js, which means running code with node index.js.

@himself65 commented on GitHub (Sep 3, 2024): Yeah, please use `bundler` if you are using like next.js, vite... use `node16` if you are using pure node.js, which means running code with `node index.js`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/LlamaIndexTS#239