unsplash / unsplash-js

🤖 Official JavaScript wrapper for the Unsplash API
https://www.npmjs.com/package/unsplash-js
MIT License
2.15k stars 157 forks source link

Error: URL.pathname not implemented #201

Open nijarv opened 1 year ago

nijarv commented 1 year ago

Steps to Reproduce

Observed Behaviour

simulator_screenshot_B2EB223E-8C13-4D76-846E-886D9274B386

Expected Behaviour

Technical Notes

Code

const serverApi = createApi({ accessKey: unsplash_access_key });
serverApi.search.getPhotos({ query: searchText, page: 1, perPage: 10 }).then(photoResp => {
            if (photoResp.errors) {
                return
            }

            const photo = result.response;
            console.log(photo);
        }).catch((err) => {
            console.log(err);
        });
iamnsrajput commented 1 year ago

I have the same error. @nijarv did u got the solution ?

"react": "18.2.0", "react-native": "0.72.4", "unsplash-js": "^7.0.18"