Skip to content
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

joinUrl is not a function #4

Open
sirajtahrawashmen opened this issue Sep 5, 2019 · 1 comment
Open

joinUrl is not a function #4

sirajtahrawashmen opened this issue Sep 5, 2019 · 1 comment

Comments

@sirajtahrawashmen
Copy link

we are using webpack for our module bundling, and there is one error caused by this library.

in file 'src/url.js' you are requiring the proper-url-join const joinUrl = require('proper-url-join');

this is importing the module instead of the function.

Possible Solutions:

  • use import urlJoin from 'proper-url-join'; instead
  • use const joinUrl = require('proper-url-join').default instead

references:
https://www.npmjs.com/package/proper-url-join
https://stackoverflow.com/questions/33683539/webpack-require-is-not-a-function-when-using-babel-6

@lsabbagh
Copy link
Owner

lsabbagh commented Sep 9, 2019

Hello Siraj.
Thank you for this...
However, It is not clear yet, adding .default will never fix it...
check this line:
https://github.com/lsabbagh/faxios/blob/master/lib/url.js#L48
.default is used when calling...
Can you add more details about the bug? and details about how you solved it so it will make it clearer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants