Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Development] Docker is not properly starting the app in dev mode

未关闭
#433 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, javascript, vite

调研方向

从 make run 调用的 Docker 开发路径开始,检查在加载 /var/www/redirect/backend/vite.config.js 之前依赖项是如何安装的。复现 vite: not found 和 Darwin-versus-Linux 的 esbuild 失败;当 make run 在容器中成功启动开发服务器时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug :bug:

Describe the bug
Started the project with make run and it's only showing this output:

> dev
> vite

sh: 1: vite: not found
2025-03-07 10:52:58 > dev
2025-03-07 10:52:58 > vite
2025-03-07 10:52:58 
2025-03-07 10:52:58 failed to load config from /var/www/redirect/backend/vite.config.js
2025-03-07 10:52:58 error when starting dev server:
2025-03-07 10:52:58 Error: 
2025-03-07 10:52:58 You installed esbuild for another platform than the one you're currently using.
2025-03-07 10:52:58 This won't work because esbuild is written with native code and needs to
2025-03-07 10:52:58 install a platform-specific binary executable.
2025-03-07 10:52:58 
2025-03-07 10:52:58 Specifically the "@esbuild/darwin-arm64" package is present but this platform
2025-03-07 10:52:58 needs the "@esbuild/linux-arm64" package instead. People often get into this
2025-03-07 10:52:58 situation by installing esbuild on Windows or macOS and copying "node_modules"
2025-03-07 10:52:58 into a Docker image that runs Linux, or by copying "node_modules" between
2025-03-07 10:52:58 Windows and WSL environments.
2025-03-07 10:52:58 
2025-03-07 10:52:58 If you are installing with npm, you can try not copying the "node_modules"
2025-03-07 10:52:58 directory when you copy the files over, and running "npm ci" or "npm install"
2025-03-07 10:52:58 on the destination platform after the copy. Or you could consider using yarn
2025-03-07 10:52:58 instead of npm which has built-in support for installing a package on multiple
2025-03-07 10:52:58 platforms simultaneously.
2025-03-07 10:52:58 
2025-03-07 10:52:58 If you are installing with yarn, you can try listing both this platform and the
2025-03-07 10:52:58 other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
2025-03-07 10:52:58 feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
2025-03-07 10:52:58 Keep in mind that this means multiple copies of esbuild will be present.
2025-03-07 10:52:58 
2025-03-07 10:52:58 Another alternative is to use the "esbuild-wasm" package instead, which works
2025-03-07 10:52:58 the same way on all platforms. But it comes with a heavy performance cost and
2025-03-07 10:52:58 can sometimes be 10x slower than the "esbuild" package, so you may also not
2025-03-07 10:52:58 want to do that.
2025-03-07 10:52:58 
2025-03-07 10:52:58     at generateBinPath (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1742:17)
2025-03-07 10:52:58     at esbuildCommandAndArgs (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1823:33)
2025-03-07 10:52:58     at ensureServiceIsRunning (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1980:25)
2025-03-07 10:52:58     at build (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1879:26)
2025-03-07 10:52:58     at bundleConfigFile (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:53989:24)
2025-03-07 10:52:58     at async loadConfigFromFile (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:53958:21)
2025-03-07 10:52:58     at async resolveConfig (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:53474:24)
2025-03-07 10:52:58     at async _createServer (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:43702:18)
2025-03-07 10:52:58     at async CAC.<anonymous> (file:///var/www/redirect/backend/node_modules/vite/dist/node/cli.js:746:20)
主要语言
Python
星标
26
派生
26
平均合并
28 分钟
30 天内合并 PR
3

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

code4romania/redirectioneaza 的其他 Issue

查看 code4romania/redirectioneaza 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。