Search code examples
node.jsnpmapple-m1rosetta

Node with Mac m1


I am having problems with node and my macOS with arm processor. I have already followed the whole discussion on this other post. I tried to do a clean install of node for arm with rosetta2, but if I run node -p "process.arch" I always get x64.

Since I have already removed and reinstalled node 5 times just today, could you please help me to find out how can I solve this problem? Thank you!


Solution

  • SOLVED! I:

    • Removed all Node files, everything, in all folders and subfolder making sure that node was completely uninstalled
    • Removed the libraries and removed the dependencies
    • Re-installed Node with brew (using arch)
    • Re-installed libraries and dependencies

    Last but not least, a fresh restart of the Mac since yarn was not working anymore (with segmentation fault).