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

Generate not working with server-only package #166

Open
markedwards opened this issue May 6, 2024 · 2 comments
Open

Generate not working with server-only package #166

markedwards opened this issue May 6, 2024 · 2 comments

Comments

@markedwards
Copy link

If I add import "server-only" to a dependency used by a next-rest-framework endpoint, the endpoint is ignored and omitted from the spec. Is this a known issue?

@markedwards
Copy link
Author

This still seems to be an issue. Using "server-only" produces an error during API spec generation or validation, although there is no issue at runtime.

@markedwards
Copy link
Author

Running with NODE_OPTIONS='--conditions=react-server' seems like it could be a fix, but that leads to:

Error: This entry point is not yet supported outside of experimental channels

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