问题 react+electron项目,在使用node中的fs时,报错fs.XXX is not a function electron 解决办法 在引入fs时,要在require前加window. 就可以了 var fs = window.require('fs');