Clarifai / clarifai-javascript

Official Clarifai JavaScript client for browsers and node.js
https://docs.clarifai.com
Other
351 stars 81 forks source link

React Native: Dependency Axios throws error 'urlParsingNode.setAttribute is undefined' #29

Closed Harshit369 closed 5 years ago

Harshit369 commented 5 years ago

"isURLSameOrigin.js" file from axios throws error urlParsingNode.setAttribute is undefined. where i found this suspicious looking code.

var urlParsingNode = document.createElement('a');
rok-povsic commented 5 years ago

@Harshit369 Any help fixing this is appreciated, we don't have lots of experience with React Native.

Harshit369 commented 5 years ago

@rok-povsic I just checked back in axios@1.11.0 and found that they didn't use to support react-native. But they do now in there latest v0.18.0 release and check the environment before checking URL, exacly here.

Harshit369 commented 5 years ago

So, i think you can just update axios to its latest stable version in your dependencies and that will do. 🤟

rok-povsic commented 5 years ago

@Harshit369 Good, we'll relax the dependencies. Thanks!