"npm install" fails on M1 Macs due to old dev dependency on electron v5
I recently replaced my old Intel-based Mac with an M1 Mac and Twing no longer installs.
Running npm install will error out before finishing:
npm ERR! Error: GET https://github.com/electron/electron/releases/download/v5.0.13/electron-v5.0.13-darwin-arm64.zip returned 404
npm ERR! ~/projects/twing/node_modules/electron/install.js:49
npm ERR! throw err
npm ERR! ^
npm ERR!
npm ERR! Error: Failed to find Electron v5.0.13 for darwin-arm64 at https://github.com/electron/electron/releases/download/v5.0.13/electron-v5.0.13-darwin-arm64.zip
Twing has a dev dependency on tape-run v6 which depends on browser-run v6 which depends on electron-stream v7 which depends on electron v5. The last release of electron 5 is 3 years old and they didn't make a darwin-arm64 build of it. https://github.com/electron/electron/releases/tag/v5.0.13 It looks like electron v11 (2 years old) was the first to include builds for M1 Macs.
According to https://npmgraph.js.org/?q=tape-run%409, we'll need to upgrade tape-run to v9 or v10 to get a recent version of election. It's possible we may need to update all the other testing-related dev dependencies too.