danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
18.17k stars 3.04k forks source link

[Bug]: Latest Code brings an error after docker build #750

Closed foward closed 1 year ago

foward commented 1 year ago

Contact Details

foward@gmail.com

What happened?

I have updated the code today and after docker build and run I am getting this error:


LibreChat         | > LibreChat@0.5.6 backend
LibreChat         | > cross-env NODE_ENV=production node api/server/index.js
LibreChat         | 
LibreChat         | Clearing sync timeouts before exiting...
LibreChat         | node:internal/modules/cjs/loader:1093
LibreChat         |   throw err;
LibreChat         |   ^
LibreChat         | 
LibreChat         | Error: Cannot find module 'langchainplus-sdk'
LibreChat         | Require stack:
LibreChat         | - /app/api/node_modules/langchain/dist/callbacks/handlers/tracer_langchain.cjs
LibreChat         | - /app/api/node_modules/langchain/dist/callbacks/handlers/initialize.cjs
LibreChat         | - /app/api/node_modules/langchain/dist/callbacks/manager.cjs
LibreChat         | - /app/api/node_modules/langchain/dist/chat_models/base.cjs
LibreChat         | - /app/api/node_modules/langchain/dist/chat_models/openai.cjs
LibreChat         | - /app/api/node_modules/langchain/chat_models/openai.cjs
LibreChat         | - /app/api/app/clients/BaseClient.js
LibreChat         | - /app/api/app/clients/ChatGPTClient.js
LibreChat         | - /app/api/app/clients/index.js
LibreChat         | - /app/api/app/index.js
LibreChat         | - /app/api/server/routes/ask/openAI.js
LibreChat         | - /app/api/server/routes/ask/index.js
LibreChat         | - /app/api/server/routes/index.js
LibreChat         | - /app/api/server/index.js
LibreChat         |     at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
LibreChat         |     at Module._load (node:internal/modules/cjs/loader:934:27)
LibreChat         |     at Module.require (node:internal/modules/cjs/loader:1157:19)
LibreChat         |     at require (node:internal/modules/helpers:119:18)
LibreChat         |     at Object.<anonymous> (/app/api/node_modules/langchain/dist/callbacks/handlers/tracer_langchain.cjs:4:29)
LibreChat         |     at Module._compile (node:internal/modules/cjs/loader:1275:14)
LibreChat         |     at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
LibreChat         |     at Module.load (node:internal/modules/cjs/loader:1133:32)
LibreChat         |     at Module._load (node:internal/modules/cjs/loader:972:12)
LibreChat         |     at Module.require (node:internal/modules/cjs/loader:1157:19) {
LibreChat         |   code: 'MODULE_NOT_FOUND',
LibreChat         |   requireStack: [
LibreChat         |     '/app/api/node_modules/langchain/dist/callbacks/handlers/tracer_langchain.cjs',
LibreChat         |     '/app/api/node_modules/langchain/dist/callbacks/handlers/initialize.cjs',
LibreChat         |     '/app/api/node_modules/langchain/dist/callbacks/manager.cjs',
LibreChat         |     '/app/api/node_modules/langchain/dist/chat_models/base.cjs',
LibreChat         |     '/app/api/node_modules/langchain/dist/chat_models/openai.cjs',
LibreChat         |     '/app/api/node_modules/langchain/chat_models/openai.cjs',
LibreChat         |     '/app/api/app/clients/BaseClient.js',
LibreChat         |     '/app/api/app/clients/ChatGPTClient.js',
LibreChat         |     '/app/api/app/clients/index.js',
LibreChat         |     '/app/api/app/index.js',
LibreChat         |     '/app/api/server/routes/ask/openAI.js',
LibreChat         |     '/app/api/server/routes/ask/index.js',
LibreChat         |     '/app/api/server/routes/index.js',
LibreChat         |     '/app/api/server/index.js'
LibreChat         |   ]
LibreChat         | }
LibreChat         | 
LibreChat         | Node.js v19.9.0
LibreChat exited with code 1```

### Steps to Reproduce

1. get latest code
2. do docker build
3. do docker compose up

### What browsers are you seeing the problem on?

_No response_

### Relevant log output

_No response_

### Screenshots

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
foward commented 1 year ago

I have tested and the only release that works for me is the v0.5.4 all the new ones above that had the same error.

techwithanirudh commented 1 year ago

@foward Please read https://github.com/danny-avila/LibreChat/issues/735 & https://github.com/danny-avila/LibreChat/issues/711

https://github.com/danny-avila/LibreChat/blob/main/docs/general_info/breaking_changes.md#v055