什么是require require是node.js中用于导入模块的语句。 为什么会出现这个错误 在该文件中node.js不可用 如何解决 在主进程的窗口属性中加入该代码即可 webPreferences:{ nodeIntegration:true,contextIsolation:false} 注意contextIsolation的第八个字母是大写的i