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

Error generating the formkit.theme.ts file of a local custom theme #1170

Closed
alcidesrh opened this issue Feb 1, 2024 · 3 comments · Fixed by #1174
Closed

Error generating the formkit.theme.ts file of a local custom theme #1170

alcidesrh opened this issue Feb 1, 2024 · 3 comments · Fixed by #1174
Assignees
Labels
🐛 bug Verified bug by team 🔴 priority-1 1. Top priority issue 🚀 release-ready Feature or fix is complete and on an upcoming release branch

Comments

@alcidesrh
Copy link

alcidesrh commented Feb 1, 2024

Reproduction

It is not playable on playgond. The link below is not useful.
https://formkit.com/playground?fkv=latest&fileTab=Playground.vue&css-framework=genesis

Describe the bug

I created a custom theme following doc) . Released on npm package management and I installed as package.json dependency. like any other. No issues.

Then when I try to generate the formkt.theme.ts file using npx formkit@latest theme --theme="path-to-mytheme I get the following errorr: Could not generate theme — Bad Request

Screenshot_20240131_234149

Environment

• OS: [Ubuntu 22.04]
• Browser [ chrome, safari]
• Version [latest]

@alcidesrh alcidesrh added ⛑ Needs triage The issue has not yet been examined by the FormKit team. 🐛 bug-report Bug is reported, but not verified by team labels Feb 1, 2024
@alcidesrh alcidesrh changed the title Error generating formkit.theme.ts file of a local custom theme Error generatingthe the formkit.theme.ts file of a local custom theme Feb 1, 2024
@andrew-boyd
Copy link
Member

This is on my agenda — there is an issue with local generation. We hope to have it resolved and provide updated documentation by the end of today.

I’ll follow-up with you here when it’s ready to roll. Sorry for the inconvenience!

@andrew-boyd andrew-boyd added 🐛 bug Verified bug by team 🔴 priority-1 1. Top priority issue and removed 🐛 bug-report Bug is reported, but not verified by team ⛑ Needs triage The issue has not yet been examined by the FormKit team. labels Feb 1, 2024
@andrew-boyd andrew-boyd self-assigned this Feb 1, 2024
@andrew-boyd
Copy link
Member

we are working to improve this process, but here is what you can do in the meantime. Install your theme from npm. Then create a file, something like formkit.theme.config.ts and inside there just re-export your theme:

import myTheme from 'your-custom-theme'

export default myTheme

Then you can use the cli to generate your theme:

npx formkit theme --theme=./formkit.theme.config.ts

@alcidesrh alcidesrh changed the title Error generatingthe the formkit.theme.ts file of a local custom theme Error generating the formkit.theme.ts file of a local custom theme Feb 1, 2024
@andrew-boyd andrew-boyd linked a pull request Feb 2, 2024 that will close this issue
@andrew-boyd andrew-boyd added the 🚀 release-ready Feature or fix is complete and on an upcoming release branch label Feb 2, 2024
@andrew-boyd
Copy link
Member

This is fixed in 1.5.4. New docs available here: https://formkit.com/guides/create-a-tailwind-theme#installing-a-published-theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Verified bug by team 🔴 priority-1 1. Top priority issue 🚀 release-ready Feature or fix is complete and on an upcoming release branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants