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

[bug]: CLI not working with Remix #4967

Closed
2 tasks done
alanwallaceross opened this issue Sep 25, 2024 · 2 comments · Fixed by #4972
Closed
2 tasks done

[bug]: CLI not working with Remix #4967

alanwallaceross opened this issue Sep 25, 2024 · 2 comments · Fixed by #4972
Labels
bug Something isn't working

Comments

@alanwallaceross
Copy link

Describe the bug

I created a fresh Remix project using the blues stack, and then when I tried to use the CLI I'm getting this error:
image

Affected component/components

All

How to reproduce

Create Remix Blues Stack template app
Follow the setup instructions
Then try to use the CLI to install a component or even do npx shadcn@latest init
Then it gives the error shown

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Windows 11, x64

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@alanwallaceross alanwallaceross added the bug Something isn't working label Sep 25, 2024
@Fluf22
Copy link
Contributor

Fluf22 commented Sep 26, 2024

Hey 👋🏻

Stumbled upon the same issue this morning. It seems some templates have a different base config than the default stacks recommended by Remix.
I made a PR to fix that (it was actually a TODO in the cli code)

Let's see if it gets accepted!

@alanwallaceross
Copy link
Author

Nice one, thank you!

@kodiakhq kodiakhq bot closed this as completed in #4972 Sep 27, 2024
@kodiakhq kodiakhq bot closed this as completed in 4b546bf Sep 27, 2024
niktekusho pushed a commit to niktekusho/shadcnui that referenced this issue Nov 21, 2024
# What

Some remix templates doesn't package a `vite.config.*` file at their root.
It's the case for the recommended starter "stack" templates: blues-stack, indie-stack and grunge-stack.
As recommended in a TODO comment, it's more suitable to check for a `@remix-run/*` dependency in the package dependencies.

# How

- decouple vite and remix checks
- retrieve the `package.json`
- allow passing a `cwd` to the retrieval method
- remove the "empty config file list" that can be empty for a remix stack
- check that the `package.json` contains a `@remix-run/*` dependency

# Test

Added a fixture by running `npx create-remix@latest --template remix-run/indie-stack` in the [frameworks](/Fluf22/shadcn-ui/tree/fix/cli-remix-detection/packages/cli/test/fixtures/frameworks) folder and named it `remix-indie-stack`, if ever we want another stack as a fixture later

---

Fixes shadcn-ui#4967
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

Successfully merging a pull request may close this issue.

2 participants