TypeError: mime.lookup is not a function
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
I got the error below. It can be fixed by following advice on [stackexchange](https://stackoverflow.com/questions/46420905/webrtc-error-with-mime-lookup):
Use mime-type instead of mime
`npm install mime-types`
then make change in your code (in this case, near the top of node_modules/connect/lib/middleware/static.js):
`mime = require('mime-types');`
```
$ node backend/server.js
info - socket.io started
starting texchat on port 8080
(node:1638) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
.../texchat/node_modules/connect/lib/middleware/static.js:144
type = mime.lookup(path);
^
TypeError: mime.lookup is not a function
at .../texchat/node_modules/connect/lib/middleware/static.js:144:17
at FSReqWrap.oncomplete (fs.js:123:15)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.