node.js中模块报错【window is not defined】的解决方法 (function(window) { /* Keep source code the same */ // })(typeof window == "undefined" ? global : window); // or })(this);