Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run build failed #500

Open
alex-ld opened this issue Feb 3, 2025 · 0 comments
Open

npm run build failed #500

alex-ld opened this issue Feb 3, 2025 · 0 comments

Comments

@alex-ld
Copy link

alex-ld commented Feb 3, 2025

[email protected]
Next.js 15.1.6
node v23.4.0
"llamaindex": "0.8.2" (installed by create-llama)

Minimum reproducible example:

npx create-llama@latest

npm run build

Failure message:

npm run build

> [email protected] build
> next build

 ⚠ Invalid next.config.mjs options detected: 
 ⚠     Unrecognized key(s) in object: 'serverComponentsExternalPackages' at "experimental"
 ⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config
 ⚠ `experimental.serverComponentsExternalPackages` has been moved to `serverExternalPackages`. Please update your next.config.mjs file accordingly.
   ▲ Next.js 15.1.6
   - Environments: .env

   Creating an optimized production build ...
 ✓ Compiled successfully
   Linting and checking validity of types  .Failed to compile.

./app/api/chat/engine/generate.ts:1:10
Type error: Module '"llamaindex"' has no exported member 'VectorStoreIndex'.

> 1 | import { VectorStoreIndex } from "llamaindex";
    |          ^
  2 | import { storageContextFromDefaults } from "llamaindex/storage/StorageContext";
  3 |
  4 | import * as dotenv from "dotenv";
Static worker exited with code: 1 and signal: null

The minimum example failed with not finding the VectorStoreIndex type definition. In my actual project bootstrapped from create-llama, it also failed with not finding other definitions even after adding them with npm or pnpm

  • @types/llamaindex/core
  • @types/llamaindex/core/schema
  • @types/js-yaml (not relevant to this repo but same behaviour)

However, running the project in dev mode (npm run dev) is completely fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant