Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Random "Assertion failed" errors on Apple M1 chip

I have just switched from Windows 10 to Mac OS running on the latest Apple M1 Silicon.

This is my first project on the Mac, I installed homebrew and used it to install both node & yarn:

brew install node
brew install yarn
yarn global add @vue/cli

My Vue project was working fine on both Windows and Linux, cloned it onto my Macbook then ran yarn to install dependencies (business as usual) then tried running the app in development mode:

yarn serve

But I kept getting random "Assertion failed" errors each time I run yarn serve, each time it's a different file but the same error message and context:

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

What's causing this? Tried Googling but as I thought, found literally nothing!

like image 369
Alaa Salah Avatar asked Mar 01 '23 14:03

Alaa Salah


1 Answers

I have managed to fix the issue.

The problem was that one of the dependencies (node-fibers) isn't compatible with nodejs v16.0.0 or later.

So the solution was to uninstall node and install NVM to use Node v15.


First had to uninstall Yarn & Node:

brew uninstall yarn
brew uninstall node

Then installed NVM:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash

After that I installed Node v15 (or whatever version you'd prefer):

nvm install v15
like image 91
Alaa Salah Avatar answered Mar 07 '23 15:03

Alaa Salah