New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] docker 中运行 npm run dev 出现Segmentation fault #12013
Comments
由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。 |
@fz6m 能帮忙看看这个问题吗?我在windows 和ubuntu 上安装docker 运行时没问题的,就是M1 MAC 不行。没有code 没法提供最小重现, 补充一下:react 项目有这个错误,vue的没问题。 |
创建一个新项目使用如下命令: pnpm create umi my-app |
这个试过的。pnpm dlx create-umi@latest; npx create-umi@latest; yarn create umi 我都尝试过一样的错误,执行到 info - Preparing... 程序就不执行了。我也尝试过更换 docker 镜像例如:FROM ubuntu:20.04; FROM ubuntu:18.04; FROM centos:7; FROM debian,都是一样的错误。我把版本切换到umi3 是没问题的[yarn create @umijs/umi-app]。我在 ubuntu 上安装docker 并且在docker 中执行pnpm dlx create-umi@latest 也没问题。应该确定就是mac M1 中安装docker 开发 umi4 有问题。 @fz6m 希望帮忙看看这个问题。 |
umi 4 使用了很多包含编译后二进制分发的包( 所以推荐在本地真实环境而非虚拟环境中进行开发,如果要在虚拟环境中开发,需要自行排查虚拟环境问题。 |
建议打开这个issue,也碰到了同样的问题,demo跑不通 Mac M2芯片, docker镜像采用ubuntu:24.04 运行自己的项目和按照文档创建项目是同样的结果 https://umijs.org/docs/guides/getting-started |
可以辛苦协助帮看下这两个代码片段是否可以正常运行吗?(在发生问题的同环境下),这有助于帮助我们定位是这个工具运行时的问题,感谢。 检验
|
es-module-parser 这个模块问题,
parser定义如下
执行命令 npx umi setup
Phoebe 2 没有打印出来 我给 es-module-parser 也提了个issue umijs/es-module-parser#2 |
@yeling 感谢帮助排查问题 🌹 ,可以再帮试一下相同环境中 |
This comment was marked as resolved.
This comment was marked as resolved.
更新一下,在 @stormslowly 提示下,node版本升级到18之后,就没有这个问题了。 |
这个问题的根源不是 node 版本升级了就解决这么简单吧,我初步目测和构建配置有关。 |
root cause没有找到,升级之后确实没有这个问题了。构建步骤都是按照官方流程来的,大概怀疑跟那几个 .node文件有关系。 |
What happens?
我在 mac M1 上使用docker 开发 umi max 项目根据 文档https://v3.umijs.org/docs/getting-started 创建新的项目后,当执行npm run dev 启动项目的时候出现 Segmentation fault Command failed with exit code 139.
Mini Showcase Repository(REQUIRED)
How To Reproduce
Steps to reproduce the behavior: 1. 2.
Expected behavior 1. 2.
build:run:postinstall:node_modules/tsx/node_modules/esbuild Completed in 200ms
9521 timing build:run:postinstall Completed in 541ms
9522 timing build:deps Completed in 740ms
9523 timing build Completed in 742ms
9524 timing reify:build Completed in 760ms
9525 timing reify:trash Completed in 63ms
9526 timing reify:save Completed in 585ms
9527 timing reify Completed in 247377ms
9528 timing command:install Completed in 251168ms
9529 verbose stack Error: command failed
9529 verbose stack at ChildProcess. (/root/.nvm/versions/node/v16.20.2/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
9529 verbose stack at ChildProcess.emit (node:events:513:28)
9529 verbose stack at maybeClose (node:internal/child_process:1100:16)
9529 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
9530 verbose cwd /SSO/test3
9531 verbose Linux 5.10.104-linuxkit
9532 verbose node v16.20.2
9533 verbose npm v8.19.4
9534 error code 139
9535 error path /SSO/test3
9536 error command failed
9537 error command sh -c -- max setup
9538 verbose exit 139
9539 timing npm Completed in 251397ms
9540 verbose code 139
9541 error A complete log of this run can be found in:
9541 error /root/.npm/_logs/2023-12-28T11_03_05_481Z-debug-0.log
The text was updated successfully, but these errors were encountered: