openapistack / openapi-client-axios

JavaScript client library for consuming OpenAPI-enabled APIs with axios
https://openapistack.co
MIT License
558 stars 67 forks source link

Dependency json-schema-deref-sync is breaking next.js dev server #38

Closed freddydumont closed 4 years ago

freddydumont commented 4 years ago

I'm getting a Module not found: Can't resolve 'fs' when starting the dev server. It appears that json-schema-deref-sync is the culprit and it's a dependency of this library.

I'm not really sure what's going on. Any ideas?

Screen Shot 2020-09-01 at 16 19 36 Screen Shot 2020-09-01 at 20 25 32

ccakes commented 4 years ago

May not be related but I'm getting a number of similar errors trying to use this in a React Native project.

The phone environment doesn't have many native Node modules available like fs or path which as far as I can tell are only used to read OpenAPI spec files from disk. It'd be good to somehow conditionally load those only if opts.definition is a file path.

jordiup commented 3 years ago

Would love to use this project on a react native app but i'm getting a similar error 😢