gpt4 book ai didi

javascript - Apple M1 芯片上的随机 "Assertion failed"错误

转载 作者:行者123 更新时间:2023-12-05 00:28:31 27 4
gpt4 key购买 nike

我刚刚从 Windows 10 切换到在最新的 Apple M1 Silicon 上运行的 Mac OS。
这是我在Mac上的第一个项目,我安装了自制 并用它来安装 Node & yarn :

brew install node
brew install yarn
yarn global add @vue/cli
我的 Vue 项目在 Windows 和 Linux 上都运行良好,将其克隆到我的 Macbook 然后运行 ​​ yarn安装依赖项(照常营业)然后尝试在开发模式下运行应用程序:
yarn serve
但是每次运行 yarn serve 时,我都会收到随机的“断言失败”错误。 ,每次它是一个不同的文件但相同的错误消息和上下文:
/node_modules/axios/lib/helpers/buildURL.jsAssertion failed: (thread_id_key != 0x7777), function find_thread_id_key, file ../src/coroutine.cc, line 134.
error Command failed with signal "SIGABRT".
这是什么原因造成的?尝试谷歌搜索,但正如我所想,实际上一无所获!

最佳答案

我已经设法解决了这个问题。
问题是其中一个依赖项(node-fibers)与 nodejs v16.0.0 或更高版本不兼容。
因此解决方案是卸载 Node 并安装 NVM 以使用 Node v15。

首先必须卸载 Yarn & Node:

brew uninstall yarn
brew uninstall node
然后安装NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
之后我安装了 Node v15(或任何你喜欢的版本):
nvm install v15

关于javascript - Apple M1 芯片上的随机 "Assertion failed"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67679878/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com