New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mp3 is defined twice causing an error #192
Comments
I'm not seeing it. Please provide a recipe for reproducing. |
Originally i was importing 'mime/lite', switching back to just 'mime' seems to have resolved the issue for me. Closing this unless I can find a valid reproducible bug. |
Having the same issue. Guess it's related to Webpack evaluating the |
I had this issue too (using webpack, and mime/lite@2.2.2)
It's not easy to reproduce that issue, will try |
@caub I need a recipe for reproducing this before I can reopen this issue. I'm not seeing any obvious issues in the module itself. (tests are passing, I'm able to require |
couldn't repeat this error, nevermind then |
can reproduce this in node repl: $ node
> var mime = require('mime')
undefined
> var mimelite = require('mime/lite')
Error: Attempt to change mapping for "mp3" extension from "audio/mp3" to "audio/mpeg". Pass `force=true` to allow this, otherwise remove "mp3" from the list of extensions for "audio/mpeg".
at Mime.define (/path/to/project/node_modules/mime/Mime.js:49:15)
at new Mime (/path/to/project/node_modules/mime/Mime.js:12:10)
> |
I found why, we need to copy types/standard.json, either or yea better, avoiding to mutate, like in your fix |
published in v2.3 |
If you have an issue with a specific extension or type
Locate the definition for your extension/type in the db.json file in the
mime-db
project. Does it look right?[ ] No. File a
mime-db
issue.[x] Yes: Go ahead and submit your issue/PR here and I'll look into it.
mp3
is defined in bothaudio/mp3
andaudio/mpeg
causing the following error:Error: Attempt to change mapping for "mp3" extension from "audio/mp3" to "audio/mpeg". Pass
force=trueto allow this, otherwise remove "mp3" from the list of extensions for "audio/mpeg".
The text was updated successfully, but these errors were encountered: