苹果M1芯片上的随机"Assertion failed"错误



我刚刚从Windows 10切换到在最新的Apple M1 Silicon上运行的Mac操作系统。

这是我在Mac上的第一个项目,我安装了自制程序,并用它来安装节点&纱线

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".

是什么原因造成的?试着在谷歌上搜索,但正如我所想,什么都没找到!

我已经设法解决了这个问题。

问题是其中一个依赖项(节点光纤(与nodejs v16.0.0或更高版本不兼容。

所以解决方案是卸载node并安装NVM以使用nodev15。


首先必须卸载Yarn&节点:

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

相关内容

最新更新