我在我的电脑上尝试了 webrtc 演示。 但在演示步骤 04 中。 当我使用 npm install 和 node index.js 时,它显示 “类型错误:mime.lookup 不是函数”。
即使在我通过输入“npm install mime”安装 mime 之后
我该如何解决这个问题并让演示正常运行?
最佳答案
use mime-type instead of mime. So, Install mime-types first: npm install mime-types then make change in your code: var mime=require('mime-types');
关于node.js - mime.lookup 的 webrtc 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46420905/