Skip to content

🐛 Bug Report: Incompatible Node version with Vite dependencies #2157

@Georgetxm

Description

@Georgetxm

📜 Description

Node version in local/pre-built Frontend's Dockerfile is not compatible with Vite.

👟 Reproduction steps

Running the pre-build docker image

  1. Run the setup.ps1 script
  2. Select option 1: Use DocsGPT Public API Endpoint (simple and free, uses pre-built Docker images from Docker Hub for fastest setup)
  3. Frontend container is unable to start due to an outdated Node version that is incompatible Vite's dependencies

Similar behaviour happens when building the Frontend container locally due to Dockerfile specifying
"FROM node:20.6.1-bullseye-slim".

👍 Expected behavior

The frontend container should run and accessing http://localhost:5173/ should show me an interface.

👎 Actual Behavior with Screenshots

Image

💻 Operating system

Windows

What browsers are you seeing the problem on?

No response

🤖 What development environment are you experiencing this bug on?

Docker

🔒 Did you set the correct environment variables in the right path? List the environment variable names (not values please!)

Not applicable.

📃 Provide any additional context for the Bug.

No response

📖 Relevant log output

2025-11-10 18:34:22 
2025-11-10 18:34:22 > [email protected] dev
2025-11-10 18:34:22 > vite --host
2025-11-10 18:34:22 
2025-11-10 18:35:46 
2025-11-10 18:35:46 > [email protected] dev
2025-11-10 18:35:46 > vite --host
2025-11-10 18:35:46 
2025-11-10 18:34:22 You are using Node.js 20.6.1. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.
2025-11-10 18:34:23 error when starting dev server:
2025-11-10 18:34:23 TypeError: crypto.hash is not a function
2025-11-10 18:34:23     at getHash (file:///app/node_modules/vite/dist/node/chunks/config.js:2670:21)
2025-11-10 18:34:23     at getLockfileHash (file:///app/node_modules/vite/dist/node/chunks/config.js:32992:9)
2025-11-10 18:34:23     at getDepHash (file:///app/node_modules/vite/dist/node/chunks/config.js:32995:23)
2025-11-10 18:34:23     at initDepsOptimizerMetadata (file:///app/node_modules/vite/dist/node/chunks/config.js:32454:53)
2025-11-10 18:34:23     at createDepsOptimizer (file:///app/node_modules/vite/dist/node/chunks/config.js:34645:17)
2025-11-10 18:34:23     at new DevEnvironment (file:///app/node_modules/vite/dist/node/chunks/config.js:35419:109)
2025-11-10 18:34:23     at Object.defaultCreateClientDevEnvironment [as createEnvironment] (file:///app/node_modules/vite/dist/node/chunks/config.js:35831:9)
2025-11-10 18:34:23     at file:///app/node_modules/vite/dist/node/chunks/config.js:25997:52
2025-11-10 18:34:23     at Array.map (<anonymous>)
2025-11-10 18:34:23     at _createServer (file:///app/node_modules/vite/dist/node/chunks/config.js:25996:58)

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🔗 Are you willing to submit PR?

Yes, I am willing to submit a PR!

🧑‍⚖️ Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions