[PR #2011] [MERGED] fix: correct SimpleDirectoryReader import path #2012

Closed
opened 2026-02-15 23:15:25 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/LlamaIndexTS/pull/2011
Author: @Mulgyeol
Created: 6/9/2025
Status: Merged
Merged: 6/10/2025
Merged by: @marcusschiesser

Base: mainHead: fix/correct-simple-directory-reader-import


📝 Commits (3)

  • b92415e fix: correct SimpleDirectoryReader import path
  • a3758e2 chore: add changeset for SimpleDirectoryReader import path fix
  • c888631 Merge branch 'main' into fix/correct-simple-directory-reader-import

📊 Changes

2 files changed (+7 additions, -1 deletions)

View changed files

.changeset/crazy-heads-invite.md (+5 -0)
📝 apps/next/src/app/(home)/page.tsx (+2 -1)

📄 Description

Documentation Update for SimpleDirectoryReader Import Path

Description

This PR corrects the import path for SimpleDirectoryReader on the main documentation landing page. The previous import statement was incorrect and appeared prominently in the official documentation, which could easily confuse users who are using the library for the first time. By updating this, we ensure that newcomers have a clear and accurate starting point.

Changes Made

  • Updated the import statement in apps/next/src/app/(home)/page.tsx.
  • Changed from:
    import { SimpleDirectoryReader, VectorStoreIndex } from "llamaindex";
    
  • To:
    import { VectorStoreIndex } from "llamaindex";
    import { SimpleDirectoryReader } from "@llamaindex/readers/directory";
    

Why

SimpleDirectoryReader is defined in packages/readers/src/directory/index.ts, and according to the monorepo structure described in CONTRIBUTING.md, it should be imported directly from its package. The incorrect import path was displayed on the main documentation page, potentially leading to confusion for new users trying to follow the example.

Testing

  • Verified the import path matches the package structure.
  • Confirmed alignment with the actual implementation location of SimpleDirectoryReader.
  • Ensured the documentation example remains clear and accurate.

Related

  • Follows the package structure described in CONTRIBUTING.md.
  • References the actual implementation in packages/readers/src/directory/index.ts.

Checklist

  • Documentation update only
  • Follows contribution guidelines
  • Maintains code example clarity
  • Proper import path verified

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/LlamaIndexTS/pull/2011 **Author:** [@Mulgyeol](https://github.com/Mulgyeol) **Created:** 6/9/2025 **Status:** ✅ Merged **Merged:** 6/10/2025 **Merged by:** [@marcusschiesser](https://github.com/marcusschiesser) **Base:** `main` ← **Head:** `fix/correct-simple-directory-reader-import` --- ### 📝 Commits (3) - [`b92415e`](https://github.com/run-llama/LlamaIndexTS/commit/b92415ebe7ddb173fc537a59060f53103d93d8bd) fix: correct SimpleDirectoryReader import path - [`a3758e2`](https://github.com/run-llama/LlamaIndexTS/commit/a3758e2cbf6c82ed9c572ae633a27b9a9d5f2f86) chore: add changeset for SimpleDirectoryReader import path fix - [`c888631`](https://github.com/run-llama/LlamaIndexTS/commit/c888631db041cfdc386d0e660c85aa4e58d42cf8) Merge branch 'main' into fix/correct-simple-directory-reader-import ### 📊 Changes **2 files changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/crazy-heads-invite.md` (+5 -0) 📝 `apps/next/src/app/(home)/page.tsx` (+2 -1) </details> ### 📄 Description ## Documentation Update for SimpleDirectoryReader Import Path **Description** This PR corrects the import path for SimpleDirectoryReader on the main documentation landing page. The previous import statement was incorrect and appeared prominently in the official documentation, which could easily confuse users who are using the library for the first time. By updating this, we ensure that newcomers have a clear and accurate starting point. **Changes Made** - Updated the import statement in `apps/next/src/app/(home)/page.tsx`. - Changed from: ```typescript import { SimpleDirectoryReader, VectorStoreIndex } from "llamaindex"; ``` - To: ```typescript import { VectorStoreIndex } from "llamaindex"; import { SimpleDirectoryReader } from "@llamaindex/readers/directory"; ``` **Why** `SimpleDirectoryReader` is defined in `packages/readers/src/directory/index.ts`, and according to the monorepo structure described in CONTRIBUTING.md, it should be imported directly from its package. The incorrect import path was displayed on the main documentation page, potentially leading to confusion for new users trying to follow the example. **Testing** - Verified the import path matches the package structure. - Confirmed alignment with the actual implementation location of `SimpleDirectoryReader`. - Ensured the documentation example remains clear and accurate. **Related** - Follows the package structure described in CONTRIBUTING.md. - References the actual implementation in `packages/readers/src/directory/index.ts`. **Checklist** - [x] Documentation update only - [x] Follows contribution guidelines - [x] Maintains code example clarity - [x] Proper import path verified --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 23:15:25 -05:00
yindo closed this issue 2026-02-15 23:15:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/LlamaIndexTS#2012