How to fix Docker builds failing on Apple Silicon in a Node project
I ran into this in a React and Node repo that several developers used through Docker Compose. The issue was the image built cleanly on Intel laptops but failed on newer Apple Silicon machines during native dependency installation. At first I blamed a random npm cache problem, but it showed up whenever node-gyp compiled an optional package inside the container. This caused new engineers could not…