Open Alek99 opened 7 months ago
Hey @Alek99 where do I implement this check, I'd like to work on this.
@TG199 I believe the change would go in this function. I'm unsure how this would impact performance if we're doing network calls for each package, that's something we'd have to be careful about before going forward with this.
@picklelo Anything in mind to handle this potential issues
We could somehow only detect the "new packages" that are added and do the check on those. Not sure what the best way for that would be. We can assume all the reflex components have valid components and only check user-made components. If it becomes too complicated I think we just hold off on this issue.
Right now in the wrapping react API a user can provide an invalid package name and get a run time error in the terminal for bun/npm about trying to download a package that doesn't exist
I think we can check this at compile time to see if the wrapping react package/version is valid by running the library through this API
https://api.npms.io/v2/package/{packageName}
where {packageName} is the name of the npm package you want to check. And then provide a more concise error message that can better help the user.See the example here with chakra https://api.npms.io/v2/package/chakra-ui