Skip to content
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

Support for NextJS Edge runtime #750

Open
AdrianMachado opened this issue Aug 16, 2023 · 0 comments
Open

Support for NextJS Edge runtime #750

AdrianMachado opened this issue Aug 16, 2023 · 0 comments

Comments

@AdrianMachado
Copy link

Summary

I am building a NextJS 13 (app directory) web application that uses this library. I get an OpenAPI file from the server and convert it to a postman collection using this library. Unfortunately, I am unable to change the runtime to the Edge Runtime due to a depndency on fs within some of the utils

Module not found: Can't resolve 'fs'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/openapi-to-postmanv2/lib/parse.js
./node_modules/openapi-to-postmanv2/lib/schemapack.js
./node_modules/openapi-to-postmanv2/index.js
...

Would it be possible to distribute a version of this package that doesn't utilize node libraries that aren't supported by Next (I think they use CF workers under the hood)? I assume that ripping out some of the CLI specific code in the package would probably get you most of the way there.

image
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

1 participant