vue3+ts build 错误:You installed esbuild for another platform than the one you‘re currently using.

文章讲述了在使用Vue3和TypeScript构建时遇到的esbuild平台不匹配错误,指出问题可能由npm在Rosetta2环境下的安装引起。解决方法是检查VSCode扩展文件夹中的esbuild-darwin-arm64包并重新安装。
摘要由CSDN通过智能技术生成

vue3+ts build 显示@esbuild/darwin-x64错误

Error:
You installed esbuild for another platform than the one you’re currently using.
This won’t work because esbuild is written with native code and needs to
install a platform-specific binary executable.

Specifically the “@esbuild/darwin-x64” package is present but this platform
needs the “@esbuild/darwin-arm64” package instead. People often get into this
situation by installing esbuild with npm running inside of Rosetta 2 and then
trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
2 is Apple’s on-the-fly x86_64-to-arm64 translation service).
在这里插入图片描述

在这里有解决办法

在这里插入图片描述

  • 检查~/. vscode/extensions文件夹。如果它不存在,请检查互联网以查找 VSCode 在您的 Mac 中存储数据的位置。
  • 在“henryansah.notejs-0.0.19”中打开终端(如果不同则替换版本号)并尝试“npm install esbuild-darwin-arm64”

然后就打包成功了:

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

1234Wu

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值