Getting Node working on a Mac M1


Many posts have been published on the topic of getting your favorite dev tools working on M1 Macs. I wanted to publish this snippet in case anyone else runs into this. The fix wasn’t a fix per se but I was able to get past the problem.

I was trying to run an ember app when I kept getting this error:

building... [Babel: @ember/test-helpers > applyPatches]node:internal/validators:154
     throw new ERR_INVALID_ARG_TYPE(name, 'Object', value);

TypeError [ERR_INVALID_ARG_TYPE]: the "options" argument must be of type object. Received an instance of Array

The stack trace provided no useful information. I tried to sleuth around the Internet using my sweet search skills and the closest thing that I could come up with an issue in the Hashicorp Vault repo. Unfortunately, that issue was no help.

The fix for me was uninstalling every dev-related tool and library since I received my machine and then reinstall Node via Homebrew. My guess as to what happened is that my path had either pointed to a version of Node installed on my machine that it shouldn’t have been using and/or Node was compiled under Rosetta incorrectly.

I hope this doesn’t happen again.