DCloud_HB_WDL
DCloud_HB_WDL
  • 发布:2019-04-02 10:53
  • 更新:2024-04-04 21:38
  • 阅读:43075

Mac系统,HBuilderX无法启动、点击无反应、点击后弹跳退出的解决方案

分类:HBuilderX

此帖子为mac解决方案,windows请参考:http://ask.dcloud.net.cn/article/35583


Mac上 HBuilderX起不来,主要有两种:

  • 新下载的起不来,请参考第一章
  • 以前可以启动,后来起不来,请略过第一章,直接看第二章

1. 重点:新下载的HBuilderX无法启动

近来,部分小伙伴反馈,刚下载的HBuilderX,安装后,点击启动,在程序呜弹跳了几下,闪退了。

解决方案:重启电脑

2. 删除.lock文件

打开操作系统终端,输入如下命令:

rm -f $HOME/Library/Application\ Support/HBuilder\ X/.lock

如删除.lock文件还无法解决启动问题,请尝试删除配置文件目录。

3. 配置文件损坏,导致无法启动

有可能是配置文件损坏了,直接删除配置文件即可。

配置文件目录:$HOME/Library/Application\ Support/HBuilder\ X

**请注意:** mac上,如果路径包含空格,需要\进行转义

如果您愿意提供损坏的配置文件给我们分析问题,这样有助于帮助其他人 email: ide@dcloud.io

$ 请在终端执行以下命令,把配置文件拷贝到桌面,并发送给我们  
$ cp -rf $HOME/Library/Application\ Support/HBuilder\ X   $HOME/Desktop/HX

删除损坏的配置文件,在命令行输入。注意:删除前,请先备份。

$ 如HBuilderX内,有重要文件,删除前,先备份  
$ rm -rf $HOME/Library/Application\ Support/HBuilder\ X

如果还是不行,重启电脑试试

4. 如果出现所有插件安装失败,请参考http://ask.dcloud.net.cn/article/36085

5. 联系方式

Mac专用交流群:148229211
Email: ide@dcloud.io

4 关注 分享
h***@vip.qq.com 3***@qq.com 3***@qq.com 阿莱恩特

要回复文章请先登录注册

9***@qq.com

9***@qq.com

:09.646 请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布
12:07:09.659 正在编译中...
12:07:09.834 failed to load config from /Users/dalong/Documents/HBuilderProjects/uniapp-vue3/vite.config.js
12:07:09.850 error during build:
12:07:09.852 Error:
12:07:09.863 You installed esbuild for another platform than the one you're currently using.
12:07:09.880 This won't work because esbuild is written with native code and needs to
12:07:09.894 install a platform-specific binary executable.
12:07:09.909 Specifically the "@esbuild/darwin-arm64" package is present but this platform
12:07:09.911 needs the "@esbuild/darwin-x64" package instead. People often get into this
12:07:09.940 situation by installing esbuild with npm running inside of Rosetta 2 and then
12:07:09.956 trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
12:07:09.969 2 is Apple's on-the-fly x86_64-to-arm64 translation service).
12:07:09.971 If you are installing with npm, you can try ensuring that both npm and node are
12:07:09.984 not running under Rosetta 2 and then reinstalling esbuild. This likely involves
12:07:09.987 changing how you installed npm and/or node. For example, installing node with
12:07:10.001 the universal installer here should work: https://nodejs.org/en/download/. Or
12:07:10.003 you could consider using yarn instead of npm which has built-in support for
12:07:10.017 installing a package on multiple platforms simultaneously.
12:07:10.019 If you are installing with yarn, you can try listing both "arm64" and "x64"
12:07:10.033 in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
12:07:10.036 https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
12:07:10.051 Keep in mind that this means multiple copies of esbuild will be present.
12:07:10.053 Another alternative is to use the "esbuild-wasm" package instead, which works
12:07:10.068 the same way on all platforms. But it comes with a heavy performance cost and
12:07:10.070 can sometimes be 10x slower than the "esbuild" package, so you may also not
12:07:10.086 want to do that.
12:07:10.102 at generateBinPath (/Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/esbuild@0.16.17/node_modules/esbuild/lib/main.js:1841:17)
12:07:10.117 at esbuildCommandAndArgs (/Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/esbuild@0.16.17/node_modules/esbuild/lib/main.js:1922:33)
12:07:10.133 at ensureServiceIsRunning (/Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/esbuild@0.16.17/node_modules/esbuild/lib/main.js:2087:25)
12:07:10.149 at build (/Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/esbuild@0.16.17/node_modules/esbuild/lib/main.js:1978:26)
12:07:10.166 at bundleConfigFile (file:///Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/vite@4.0.3/node_modules/vite/dist/node/chunks/dep-0bae2027.js:61966:26)
12:07:10.183 at loadConfigFromFile (file:///Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/vite@4.0.3/node_modules/vite/dist/node/chunks/dep-0bae2027.js:61942:31)
12:07:10.185 at resolveConfig (file:///Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/vite@4.0.3/node_modules/vite/dist/node/chunks/dep-0bae2027.js:61564:34)
12:07:10.203 at doBuild (file:///Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/vite@4.0.3/node_modules/vite/dist/node/chunks/dep-0bae2027.js:44332:26)
12:07:10.221 at Module.build (file:///Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/vite@4.0.3/node_modules/vite/dist/node/chunks/dep-0bae2027.js:44321:22)
12:07:10.239 at /Users/dalong/Documents/HBuilderProjects/uniapp-vue3/node_modules/.store/vite@4.0.3/node_modules/vite/index.cjs:23:55



cli项目,运行报这个错,m1芯片,用命令启动没有问题
2024-04-04 21:38
bpbpbpbp

bpbpbpbp

1,测试
2024-03-09 14:45
1***@qq.com

1***@qq.com

回复 DCloud_HB_WDL :
大佬,看看我的问题,谢谢
2024-03-08 16:50
1***@qq.com

1***@qq.com

你好!macOs14.1 ,M3pro芯片,下载最新版本无法打开,删除目录前报异常报告,删除目录后直接闪退,进群管理没有回复,跪求解决办法!
2024-03-08 16:38
1***@163.com

1***@163.com

回复 DCloud_HB_WDL :
好的
2022-03-29 14:06
DCloud_HB_WDL

DCloud_HB_WDL (作者)

回复 1***@163.com :
需要详细的信息,如果方便添加下QQ群:793046085,进群at管理员
2022-03-29 11:54
1***@163.com

1***@163.com

我是macOS Big sur 11.3.1版本,hbuilder版本是最新的,但是打不开,.lok文件我也删除试过了 就是不行,一直在程序坞中跳,为什么呀
2022-03-29 11:48
4***@qq.com

4***@qq.com

我的是安装已损坏,关闭程序从应用程序页面快捷键F4重新打开程序有提示!重新安装就好了
2022-01-19 15:27
5***@qq.com

5***@qq.com

本人已解决,mac第一切换另外一个用户打开hubilder,然后成功后关闭(一定要关闭),在重启,切换到闪退用户打开
2021-09-07 16:04
睡不醒哎

睡不醒哎

回复 2***@qq.com :
可以了,感谢,之前都是直接删除配置文件夹,导致插件需要重新安装,项目要重新导入。不过为啥有时候 HBuilderx 会导致电脑自动关机呢,然后第二天 HBuilderx 就打不开了。。。。 @DCloud_HB_WDL
2021-06-23 11:03