Skip to content

[FEATURE] Add warnings to popular packages that opennext doesn't support #532

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

Open
2 tasks done
dario-piotrowicz opened this issue Apr 4, 2025 · 1 comment
Open
2 tasks done
Labels
enhancement New feature or request triage

Comments

@dario-piotrowicz
Copy link
Contributor

dario-piotrowicz commented Apr 4, 2025

It would be nice if the adapter should warn or even error when it detects that some unsupported packages are being used.

Ideally we should have a check that:

  • checks the current package.json (or whatever makes more sense)
  • if it doesn't find any problematic package nothing happens
  • if it does fine a package which we have issues with it checks its version
    • if the version is in the range we have problems with (after a version the package could have been fixed for example)
      • if the issues we have with the package are not critical (something doesn't work perfectly but it doesn't introduce huge issues) than a warning is shown
      • if the issues we have with the package are critical (it not working properly for example can introduce vulnerability risks) then an error should actually be thrown stopping the build

The warning/error should also point to a page to the docs, or maybe a sub-page of https://opennext.js.org/cloudflare/known-issues where we have a list of the problematic packages where the issues are clearly explained to users

Note

I am not sure if the erroring bit could be a bit overkill and warnings should generally do? 🤔
(because if we have false positives in the check this could be really really annoying to users)

@opennextjs/cloudflare version

1.0.0-beta.0

Before submitting

  • I have checked that there isn't already a similar feature request
  • This is a single feature (not multiple features in one request)
@dario-piotrowicz dario-piotrowicz added enhancement New feature or request triage labels Apr 4, 2025
@dario-piotrowicz
Copy link
Contributor Author

An example of a package that would get such a warning is next-themes (#511) (hopefully we can fix the issue upstream, thus why the version check could be applied not to show the warning for future versions of the package 🙂🤞)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant