webrtc error with mime.lookup

一世执手 提交于 2019-12-04 07:33:42
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');
jaemin

I'm having the same issue with step 4. You can changing the node-static version from 0.7.7 to 0.7.10 in package.json and rerunning npm install

  "dependencies": {
    "node-static": "0.7.10",
    "socket.io": "1.2.0" }
Md Abu aslam

if you have a folder "node modules" in your root directory,delete that and type npm cache clear and then type npm install.this should work fine

I have the same issue but then try to use mime ~1.2.7 and i think this will work fine. just change your version of mime in package.json file and install it.

change mime.lookup(type) to mime.getType(type)

As @HRISHABH RAJ mentioned you want to reference mime-type instead of mime however you should check your node_modules folder first to see if the package is already installed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!