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.39k stars 3.08k forks source link

[Bug]: Error: Cannot find module 'winston' as of most recent commits #1012

Closed jordantgh closed 1 year ago

jordantgh commented 1 year ago

Contact Details

No response

What happened?

On both Windows 11 and Ubuntu 22.04, pulling down the latest commit and running the usual docker-compose up fails due to Error: Cannot find module 'winston'.

Steps to Reproduce

What I've tried:

Ubuntu:

  1. git pull in my existing LibreChat folder
  2. docker-compose up

Ubuntu/Windows 11

  1. Move to a new folder and clone the repo afresh
  2. docker-compose up

Relevant log output

LibreChat         | > LibreChat@0.5.9 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 'winston'
LibreChat         | Require stack:
LibreChat         | - /app/api/utils/logger.js
LibreChat         | - /app/api/strategies/localStrategy.js
LibreChat         | - /app/api/strategies/index.js
LibreChat         | - /app/api/server/socialLogins.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/utils/logger.js:1:17)
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/utils/logger.js',
LibreChat         |     '/app/api/strategies/localStrategy.js',
LibreChat         |     '/app/api/strategies/index.js',
LibreChat         |     '/app/api/server/socialLogins.js',
LibreChat         |     '/app/api/server/index.js'
LibreChat         |   ]
LibreChat         | }
LibreChat         |
LibreChat         | Node.js v19.9.0
LibreChat exited with code 1

Code of Conduct

jordantgh commented 1 year ago

User error, I didn't run docker-compose build first. Cheers to Danny on Discord.