question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mime dependency breaking changes

See original GitHub issue

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.<anonymous> (/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.<anonymous> (/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.<anonymous> (/home/ubuntu/newfleet/app/node_modules/knox/lib/index.js:13:28)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:10
  • Comments:11

github_iconTop GitHub Comments

16reactions
acarl005commented, Sep 14, 2017

Similar problem. We use Node 8 but instead we get a runtime error.

ERROR TypeError: mime.lookup is not a function
     at /app/node_modules/knox/lib/client.js:363:28
     at FSReqWrap.oncomplete (fs.js:153:5)
13reactions
PyroSAcommented, Sep 14, 2017

Thanks @valtlfelipe & @neebz You can temporarily use their fixed version of 0.9.2 by using: "knox": "git://github.com/caremerge/knox.git#b1e031c209b3c17cab622a458e87728c1ee88cbd", In your package.json

Read more comments on GitHub >

github_iconTop Results From Across the Web

mime - npm
A comprehensive, compact MIME type module. Build Status. Version 2 Notes. Version 2 is a breaking change from 1.x as the semver implies....
Read more >
Changelog | Meteor API Docs
Summary of breaking changes. As Node.js version was upgraded to a new major version we recommend that you review if your npm dependencies...
Read more >
browserify-mime | Yarn - Package Manager
v2.0.1 (14/09/2017) · [closed] Changelog for v2.0 does not mention breaking changes #171 · [closed] MIME breaking with 'class' declaration as it is...
Read more >
Changelog - Cypress Documentation
Experimental Breaking Changes: cy.origin() now supports using require() and dynamic import() to include dependencies. Cypress.require() has been removed.
Read more >
Error: Can't resolve 'path' in 'C:\work\demo\node_modules ...
BREAKING CHANGE : webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found