<TL/DR> Downgrading from Node 15 to Node 14 or Node 12 solves the problem.
My environment:
I'm running a MacBook Air with the M1 ARM chip. I don't know if it is related or not but it might be.
Version combinations known to work:
Currently running v14.15.4 x64 with firebase-tools 9.2.2. That combination seems to work without a glitch.
Before settling on that I've tried v12.20.1 x64 with firebase-tools 9.2.2 and that worked as well.
Version combinations I tried and failed:
I've tried node v15.6.0, both arm64 and x64, with firebase-tools 9.2.2, 9.2.1, 9.2.0, 9.1.2 and 8.20.0 without success.
Also tried node v15.7.0 arm64 with firebase-tools 9.2.2 without success.
Getting those on an M1 Mac:
If you, like me, are using an M1 Mac, you might already know v14 won't compile in the M1. You'll need to use x64 versions for anything that is not v15.5 or above.
There are many guides and also the official NodeJS download for the x64 versions that will run just fine on rosetta 2 (do not try the ARM ones, those are for Linux only at this point and won't work on your Mac).
If you are using nvm to manage your versions and want to have both x64 and arm64 versions installed, this is how I did it:
Getting x64 and arm64 versions to live together:
nvm install
will add a node version. If you did nothing special to your machine then nvm install 15
should work for you. There are no pre-compiled binaries for the M1 just yet, so be prepared to wait some minutes(more than 10).
To get Node 14 setup just open a new terminal window and type in arch -x86_64 zsh
, that will start a new zsh process in x64 mode. On that same terminal type nvm install 14
. That should be much faster than v15 and, depending on your internet speed, return in just a few seconds. You are all set. close this terminal tab and forget it ever existed.
Now running nvm use 15
will set node to run the v15 arm64 version and running nvm use 14
will run the v14 x64 version.
To check your node version you can run node --version
and to check the architecture you can run node -p "process.arch"