Skip to content

[ BUG ] Unable to Add Form to Project Using the CLI #369

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
zophiana opened this issue Mar 26, 2025 · 8 comments
Open

[ BUG ] Unable to Add Form to Project Using the CLI #369

zophiana opened this issue Mar 26, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@zophiana
Copy link

Describe the bug
Can't add form to project. It is listed in the demo app but I cant find it in the docs neither can I add this to my project.

To Reproduce
Steps to reproduce the behavior:

  1. init the project with: npx @react-native-reusables/cli@latest init
  2. try to add the form via: npx @react-native-reusables/cli@latest add form
  3. command fails

Expected behavior
the command adds all the stuff needed for the form

Platform (please complete the following information):
Tested with:

  • Windows 11
  • npm v22.14.0

Additional context
I didn't found any information if this is just not (yet) supported or something else.

I am happy to contribute changes if there is just some stuff missing that need to be done. Please let me know!

@zophiana zophiana added the bug Something isn't working label Mar 26, 2025
@Dillonpw
Copy link

There is no form component currently in the rnr docs from what I can see. Not sure where the teams stands but it may be something they are interested in doing at some point.

@zophiana
Copy link
Author

zophiana commented Apr 1, 2025

@Ammar-theScorpion
Copy link

what error message do you get?
Have you tried running the command in administrator mode using cmd?

@zophiana
Copy link
Author

zophiana commented Apr 4, 2025

what error message do you get?

Those:

❯ : npx @react-native-reusables/cli@latest add form
⠋ Installing components...Invalid component(s): form

or

❯ : npx @react-native-reusables/cli@latest add forms
⠋ Installing components...Invalid component(s): forms

Have you tried running the command in administrator mode using cmd?

I would be scared if I would have to run this as root tbh. I was able to add the button, label or input components without root privileges, so I don't think this is the issue.

@phix-o
Copy link

phix-o commented Apr 19, 2025

@zophiana From what I can see, the form component was deprecated: #104.

IMO, this would be a nice (re)addition to the project. I don't know why it was deprecated, someone who knows could chime in, but I'd be happy to work on it.

Comment of interest:
#104 (Comment)

@zophiana
Copy link
Author

@zophiana From what I can see, the form component was deprecated: #104.

Thanks, yeah I think the form component also used some deprecated components. So those probably also need to be brought back

@phix-o
Copy link

phix-o commented Apr 24, 2025

I was able to get it to work in a project I'm working and followed a similar API to shadcn-ui's Form. I haven't thoroughly tested it yet, maybe some edge cases exists, but for what I was using it for it works.

EDIT
Seems like my solution would be out of the projects scope as it relies on third party packages 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants