Why does Electron need to be saved as a developer dependency?
问题 As per the official website, the correct way to save electron files is: npm install electron --save-dev Electron is actually required for running the app (quite literally: require() ) and this goes against the top voted answer here. So why do we make this exception, if this is even one? 回答1: The fact that you require a package is irrelevant to whether it should be considered a dependency or a devDependency (in the npm sense). E.g. many projects use webpack API (i.e. const webpack = require(