[Development] Docker is not properly starting the app in dev mode
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, javascript, vite
- 领域
- build-system, devops, frontend
调研方向
从 make run 调用的 Docker 开发路径开始,检查在加载 /var/www/redirect/backend/vite.config.js 之前依赖项是如何安装的。复现 vite: not found 和 Darwin-versus-Linux 的 esbuild 失败;当 make run 在容器中成功启动开发服务器时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
code4romania/redirectioneaza 的其他 Issue
-
enhancement :rocket:
难度 2/5 1-3 小时 新手友好度 80/100
code4romania/redirectioneaza#756 ·
-
bug :bug:
难度 2/5 1-3 小时 新手友好度 68/100
code4romania/redirectioneaza#754 · 1 条评论 ·
-
Needs procedure
难度 5/5 一周以上 新手友好度 30/100
code4romania/redirectioneaza#758 ·
-
enhancement :rocket:
难度 4/5 3-5 天 新手友好度 52/100
code4romania/redirectioneaza#757 ·
-
enhancement :rocket:
难度 4/5 3-5 天 新手友好度 48/100
code4romania/redirectioneaza#753 ·
查看 code4romania/redirectioneaza 的全部 Issue
相似的 Issue
-
flaky-watch
难度 2/5 1-3 小时 新手友好度 88/100
btclib-org/btclib#2839 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
nion-software/nionswift#2018 ·
维护者通常 1 天内回复
-
Deleting a member fails when another member's share transfer points to them可能已有人在做 @Beerlesklopfer 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
FoodCoopX/wirgarten-tapir#1336 ·
维护者通常 3 天内回复
-
pydanty:is-working
难度 2/5 1-3 小时 新手友好度 71/100
pydantic/pydantic-ai#11467 ·
维护者通常 1 天内回复
-
automated issue linkchecker report
难度 2/5 1-3 小时 新手友好度 66/100
QuantEcon/lecture-python.myst#1098 ·
维护者通常 1 天内回复