-
Notifications
You must be signed in to change notification settings - Fork 29
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
fetch-cookie fails at startup for react-native app #69
Comments
Ahh I'm thinking that might be React Native not supporting the Can you try editing
And let me know if that solves the build? If so I'll publish an update to include those |
Thanks for the quick reply! I added what you suggested to the root in node_modules/fetch-cookie/package.json, but unfortantly getting same error when running npm install in the node_modules/fetch-cookie folder. |
Ah yeah that part is normal, that's the fetch-cookie build scripts not being compatible with Windows but you shouldn't need that because it's shipped on npm prebuilt! Can you rerun the build that triggered the Edit: I just published 2.0.2 with this change because I think that it's a good addition either way, so you can just try to install fetch-cookie@2.0.2 and see if that fixes the issue :) |
I am having some progress! New error message when running the app:
I tried installing the http package, but that didnt help. |
Looks like that solved the fetch-cookie issue at least! This one seems specific to node-fetch node-fetch is really built for the Node environment so I don't think it's supposed to work with React Native, Expo and such... but I believe you should have a working global |
Yes. I investigated a bit further and concluded I couldn't find a workaround for this library using node-specific packages that is unavailable in react native. I can achieve what I intend to do with fetch, its just more work. Thank you anyways for the help! |
Hi!
I am attempting to use fetch-cookie in a react native application. I get the following runtime error after I only added the import
I tried running npm install in node_modules/fetch_cookie and got the following error, but im not sure if this is relevant?
package.json looks like this:
I have also attempted to make a metro.config.js as described in https://stackoverflow.com/questions/60124435/however-this-package-itself-specifies-a-main-module-field-that-could-not-be-r, but still same error.
I am using React-Native and Expo, developing on Windows. Running on Android emulator using Android Studio. Npm version 6.14.15 and node version 14.17.6.
Any ideas what I can attempt to solve this? Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered: