mime dependency breaking changes
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 283
- PR merge metrics
- No merged PRs in 30d
Description
[node-mime](https://github.com/broofa/node-mime) has released a new version, which requires **node>=6**. And in package.json of knox requires mim in any version `"mime": "*",`.
My enviorment uses node 4, and this just broke my application.
Please merge https://github.com/Automattic/knox/pull/325.
See the stack trace.
```
/home/ubuntu/newfleet/app/node_modules/knox/node_modules/mime/Mime.js:5
class Mime {
^^^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/ubuntu/newfleet/app/node_modules/knox/node_modules/mime/index.js:1:76)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/ubuntu/newfleet/app/node_modules/knox/lib/client.js:20:12)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/ubuntu/newfleet/app/node_modules/knox/lib/index.js:13:28)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with package.json and the dependency usage shown through lib/client.js, then review pull request #325 and reproduce the reported stack trace under Node 4. Done means the dependency resolution no longer selects a mime release requiring Node 6 and the existing application path loads successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100