node.js中模块报错【window is not defined】的解决方法

(function(window) {

/* Keep source code the same */

// })(typeof window == "undefined" ? global : window);
// or 
})(this);

  

原文地址:https://www.cnblogs.com/ningkyolei/p/4737039.html