Skip to content

Issue when trying to use openapi-client-axios with react native #140

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

Closed
FranDepascuali opened this issue Jan 5, 2023 · 1 comment
Closed

Comments

@FranDepascuali
Copy link

FranDepascuali commented Jan 5, 2023

Hi, thanks for this awesome lib!!
I'm trying to integrate it with react-native. The project compiles, but whenever I run it, I receive the error:

https could not be found within the project or in these directories:
node_modules/@apidevtools/json-schema-ref-parser/node_modules
node_modules

As little as I understand, https module seems to not be included in the react-native runtime.
https://stackoverflow.com/questions/29371694/react-native-and-requirehttp

For this specific case you'll likely want to use the fetch API which is provided by the environment. React Native does not run inside of the node runtime.

I tried to registerRunner but didn't have any luck :(

Is there any fallback I could try here?

Thanks!
Depa

@FranDepascuali FranDepascuali changed the title Issue when trying to use this lib with react native Issue when trying to use openapi-client-axios with react native Jan 5, 2023
anttiviljami added a commit that referenced this issue Jan 14, 2023
Fixes build issues #140, #116, #57 when transpiling this library without node polyfills
@anttiviljami
Copy link
Member

Fixed with [email protected]

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