MAC M1 芯片在 yarn install 时报错:The CPU architecture “arm64“

博主在新M1芯片的Mac上安装nvm、node和yarn时遇到问题,yarninstall报错不支持arm64架构。经过尝试,发现通过直接从node官网下载最新安装包而非使用nvm,最终成功解决问题,反映出M1生态还在发展中。
摘要由CSDN通过智能技术生成

新公司新电脑,最强 M1 芯片 MAC,兴高采烈装环境:nvm、node、yarn…
然鹅,yarn install 装包时给了我重头一击…

背景

首先我用下面命令安装了 nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash

然后用 nvm 安装了 node
然后用下面命令安装了 yarn

curl -o- -L https://yarnpkg.com/install.sh | bash

然后兴高采烈的 yarn install

报错

@ls-lint/ls-lint@1.9.2: The CPU architecture "arm64" is incompatible with this module.

竟然说不支持 M1 芯片!!!
赶快 Google,但并没有获取到任何有用的信息。。。
心想这下完了,但我并没放弃。

解决

折腾无数次后,在我绝望的卸载 nvm 后,重新从node官网拿了最新安装包,再次尝试竟然成功了!

看来 M1 生态还需要时间成长呀!


码字不易,觉得有帮助的小伙伴右上角点个赞鼓励下~

在这里插入图片描述

扫描上方二维码关注我的订阅号~

Unsupported platform for @esbuild/darwin-arm64@0.19.2: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"win32","arch":"x64"}) 这个错误提示意味着你的操作系统不支持安装或运行 @esbuild/darwin-arm64@0.19.2 这个包。根据提示信息,该包要求的操作系统为 darwin (Mac) 并且架构为 arm64,但你的当前操作系统为 win32 (Windows) 并且架构为 x64。因此,你需要在支持的操作系统上安装或运行该包。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [ notsup Unsupported platform for n@9.0.0: wanted {“os“:“!win32“,“arch“:“any“} (current: {...](https://blog.csdn.net/qq_30908729/article/details/127082457)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [解决Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported](https://download.csdn.net/download/weixin_38518958/14887600)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

张兴华(MarsXH.Chang)

喜欢的可以请作者喝杯咖啡~

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

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

打赏作者

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

抵扣说明:

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

余额充值