africastalking-node.js icon indicating copy to clipboard operation
africastalking-node.js copied to clipboard

Error: Attempt to change mapping for "form" extension from "application/x-www-form-urlencoded" to "application/x-www-form-urlencoded". Pass `force=true`

Open lintdeveloper opened this issue 2 years ago • 1 comments

I have issues when building app in production using africas talking api

e.js:56
        throw new Error(
              ^
Error: Attempt to change mapping for "form" extension from "application/x-www-form-urlencoded" to "application/x-www-form-urlencoded". Pass `force=true` to allow this, otherwise remove "form" from the list of extensions for "application/x-www-form-urlencoded".
    at Mime.define (/Users/mussa/Documents/Source/Vircap/vircap-backend/node_modules/mime/Mime.js:56:15)
    at Object.<anonymous> (/Users/mussa/Documents/Source/Vircap/vircap-backend/node_modules/unirest/index.js:26:6)

lintdeveloper avatar Mar 13 '22 08:03 lintdeveloper

I'm having this same issue and I believe it's related to this open PR in unirest https://github.com/Kong/unirest-nodejs/pull/129 Please is there a possible fix aside hoping https://github.com/Kong/unirest-nodejs/pull/129 gets merged?

Tyak99 avatar Mar 16 '22 21:03 Tyak99

Hello @lintdeveloper and @Tyak99, are you still experiencing this error? If yes, could you help me reproduce it so we can look into it and fix it?

DaggieBlanqx avatar Oct 23 '22 22:10 DaggieBlanqx

Issue update: In commt fc7a59a, we dropped unirest for axios. The error that you experienced was traced back to unirest. Thus, by removing unirest, this issue too was resolved. Thank you @lintdeveloper and @Tyak99 for bringing this error to our attention and for helping us improve this SDK for everyone.

DaggieBlanqx avatar Feb 24 '23 09:02 DaggieBlanqx