[GH-ISSUE #5354] [BUG]: Document Creation skill (Excel) fails — exceljs bundle missing lib/doc directory; npm install destroys node_modules #5039

Closed
opened 2026-06-05 14:51:40 -04:00 by yindo · 1 comment
Owner

Originally created by @anthion on GitHub (Apr 5, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5354

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Environment:

  • AnythingLLM version: 1.12.0 (desktop)
  • OS: Windows 11
  • Hardware: i9-13900K, 64GB RAM, RTX 4090 24GB VRAM
  • LLM backend: LM Studio (local)
  • Model: Qwen3.5-35B-A3B Q4_K_M

Description:

The exceljs module bundled with ALLM is missing its lib/doc directory, causing all Excel file creation to fail with a module error. The agent falls back to CSV informing the user. Attempting to fix this via npm install exceljs destroys the ALLM node_modules tree, requiring a full reinstall.

Reproduction steps:

  1. Enable Document Creation skill with Excel enabled
  2. Ask the agent to create any Excel file
  3. Observe backend error: Cannot find module './doc/workbook'
  4. Agent falls back to CSV

Verify the missing directory:

ls "C:\Users\{username}\AppData\Local\Programs\AnythingLLM\resources\backend\node_modules\exceljs\lib"

doc directory is absent from the shipped bundle.

Expected behavior:
Excel file is created successfully, or failure is clearly reported to the user.

Actual behavior:
Excel creation fails due to missing lib/doc in the bundled exceljs 4.4.0. Agent falls back to CSV without disclosing the error.

Warning — do not attempt npm install exceljs:
Running npm install exceljs in the ALLM backend directory removes approximately 1,080 packages from node_modules, breaking ALLM entirely. Recovery requires a full application reinstall.

Workaround:
Download the complete exceljs 4.4.0 tarball directly from npm and manually copy the missing lib/doc folder:

Invoke-WebRequest -Uri "https://registry.npmjs.org/exceljs/-/exceljs-4.4.0.tgz" -OutFile "$env:USERPROFILE\Downloads\exceljs.tgz"
cd "$env:USERPROFILE\Downloads"
tar -xzf exceljs.tgz
Copy-Item -Recurse "package\lib\doc" "C:\Users\{username}\AppData\Local\Programs\AnythingLLM\resources\backend\node_modules\exceljs\lib\doc"

Restart ALLM after copying. Excel download links then work correctly.


Are there known steps to reproduce?

Reproduction steps:

  1. Enable Document Creation skill with Excel enabled
  2. Ask the agent to create any Excel file
  3. Observe backend error: Cannot find module './doc/workbook'
  4. Agent falls back to CSV
Originally created by @anthion on GitHub (Apr 5, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5354 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? **Environment:** - AnythingLLM version: 1.12.0 (desktop) - OS: Windows 11 - Hardware: i9-13900K, 64GB RAM, RTX 4090 24GB VRAM - LLM backend: LM Studio (local) - Model: Qwen3.5-35B-A3B Q4_K_M **Description:** The exceljs module bundled with ALLM is missing its `lib/doc` directory, causing all Excel file creation to fail with a module error. The agent falls back to CSV informing the user. Attempting to fix this via `npm install exceljs` destroys the ALLM node_modules tree, requiring a full reinstall. **Reproduction steps:** 1. Enable Document Creation skill with Excel enabled 2. Ask the agent to create any Excel file 3. Observe backend error: `Cannot find module './doc/workbook'` 4. Agent falls back to CSV **Verify the missing directory:** ```powershell ls "C:\Users\{username}\AppData\Local\Programs\AnythingLLM\resources\backend\node_modules\exceljs\lib" ``` `doc` directory is absent from the shipped bundle. **Expected behavior:** Excel file is created successfully, or failure is clearly reported to the user. **Actual behavior:** Excel creation fails due to missing `lib/doc` in the bundled exceljs 4.4.0. Agent falls back to CSV without disclosing the error. **Warning — do not attempt `npm install exceljs`:** Running `npm install exceljs` in the ALLM backend directory removes approximately 1,080 packages from node_modules, breaking ALLM entirely. Recovery requires a full application reinstall. **Workaround:** Download the complete exceljs 4.4.0 tarball directly from npm and manually copy the missing `lib/doc` folder: ```powershell Invoke-WebRequest -Uri "https://registry.npmjs.org/exceljs/-/exceljs-4.4.0.tgz" -OutFile "$env:USERPROFILE\Downloads\exceljs.tgz" cd "$env:USERPROFILE\Downloads" tar -xzf exceljs.tgz Copy-Item -Recurse "package\lib\doc" "C:\Users\{username}\AppData\Local\Programs\AnythingLLM\resources\backend\node_modules\exceljs\lib\doc" ``` Restart ALLM after copying. Excel download links then work correctly. --- ### Are there known steps to reproduce? **Reproduction steps:** 1. Enable Document Creation skill with Excel enabled 2. Ask the agent to create any Excel file 3. Observe backend error: `Cannot find module './doc/workbook'` 4. Agent falls back to CSV
yindo added the possible bugDesktop labels 2026-06-05 14:51:40 -04:00
yindo closed this issue 2026-06-05 14:51:40 -04:00
Author
Owner

@timothycarambat commented on GitHub (Apr 6, 2026):

Ah, we have some custom build scripts to prune READMEs and docs and other files that are relevant but bloat the node modules. They got pruned by accident here. It is patched now and will be resolved in next patch release

<!-- gh-comment-id:4194234198 --> @timothycarambat commented on GitHub (Apr 6, 2026): Ah, we have some custom build scripts to prune READMEs and docs and other files that are relevant but bloat the node modules. They got pruned by accident here. It is patched now and will be resolved in next patch release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5039