fix: improve error handling in npm install (#21589)
fix: improve error handling in npm install (#21589)

* fix: improve error handling in npm install

* chore: simplify logic

seanchas116/electron,gerhardberger/electron,gerhardberger/electron,bpasero/electron,electron/electron,bpasero/electron,electron/electron,electron/electron,bpasero/electron,seanchas116/electron,gerhardberger/electron,seanchas116/electron,electron/electron,bpasero/electron,bpasero/electron,gerhardberger/electron,seanchas116/electron,gerhardberger/electron,electron/electron,gerhardberger/electron,electron/electron,bpasero/electron,seanchas116/electron,gerhardberger/electron,electron/electron,seanchas116/electron,bpasero/electron