As of November 27, 2021, node-sass
does not work on M1 Macs. Instead, if you use dart sass
(the sass
package), note that it may not work with Node 16 or later versions, making Node 15 the stable choice.
(You might encounter the error: Assertion failed: (thread_id_key != 0x7777), function find_thread_id_key, file coroutine.cc, line 134.
)
https://qiita.com/kuroro_ru/items/c907bf076002a5a985d0
curl -L git.io/nodebrew | perl - setup
After installation, set the environment variables as instructed.
export PATH=$HOME/.nodebrew/current/bin:$PATH
nodebrew ls-remote
nodebrew compile v15.14.0
Although you might be inclined to run nodebrew install v...., there are generally no binaries for Darwin ARM in the repository (though there are binaries for Linux ARM and Darwin x64), so the installation will fail.
Therefore, if you are using an M1 Mac, you need to compile it yourself.
Once it's compiled, you can run
nodebrew use v15.14.0
Comments