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

New admin breaks assets:precompile when host app has default Tailwind setup. #5410

Closed
peterberkenbosch opened this issue Oct 3, 2023 · 3 comments

Comments

@peterberkenbosch
Copy link
Contributor

peterberkenbosch commented Oct 3, 2023

Steps to reproduce:

  1. rails new store -j esbuild -d postgresql --css=tailwind
  2. bundle add solidus
  3. bin/rails g solidus:install (only adding devise and none for frontend and payment systems)
  4. bundle add solidus_admin
  5. bin/rails g solidus_admin:install
  6. bin/rake assets:precompile

output:

#> bin/rake assets:precompile
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.05s.
yarn run v1.22.19
$ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets

  app/assets/builds/application.js      235.8kb
  app/assets/builds/application.js.map  409.9kb

✨  Done in 0.11s.
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.05s.
yarn run v1.22.19
$ tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify

Rebuilding...

Done in 96ms.
✨  Done in 0.40s.
Specified config file /Users/peterberkenbosch/code/sandbox/store/config/tailwind.config.js does not exist.
rake aborted!
Command failed with exit 9: /Users/peterberkenbosch/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/tailwindcss-rails-2.0.30-arm64-darwin/exe/arm64-darwin/tailwindcss

Tasks: TOP => assets:precompile => tailwindcss:build
(See full trace by running task with --trace)
@peterberkenbosch
Copy link
Contributor Author

moving the generated tailwind.config.js to the config directory to match the expectation breaks the default Rails installation.

@peterberkenbosch
Copy link
Contributor Author

Closing this as I can't reproduce this anymore with the latest versions from main branch.

@malakada
Copy link

malakada commented Jun 14, 2024

I'm having this issue with a fresh install. 🥲

Specifically, assets compile fine in development environment, but fail in production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants