That's not necessarily a good comparison. Electron comes as a binary, so it already has all its own hundreds of dependencies integrated.
The dependency hell wit JS projects is real, and upgrading can become a major timesink and pain if you are not maintaining and upgrading the project constantly.