当我运行它时node server.js
,它给了我以下错误:
/Users/Phil/Desktop/webrtc-core/node_modules/peerjs/lib/adapter.js:1
le, __filename, __dirname) { module.exports.RTCSessionDescription = window.RTC
^
ReferenceError: window is not defined
at Object.<anonymous> (/Users/Phil/Desktop/webrtc-core/node_modules/peerjs/lib/adapter.js:1:102)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/Phil/Desktop/webrtc-core/node_modules/peerjs/lib/util.js:5:25)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
窗口不是在adapter.js 文件中定义的吗?