fix: tailwind with jaspr serve
BinaryShrub opened this issue · 3 comments
BinaryShrub commented
Description
Followed https://docs.page/schultek/jaspr/eco/tailwind after running jaspr create test
but serve is failing.
jaspr serve
[CLI] Running jaspr in static rendering mode.
[BUILDER] [ERROR] ProcessException: No such file or directory
[BUILDER] [ERROR] Command: tailwindcss --input /tmp/scratch_spaceWHZUKE/web/styles.tw.css --output /tmp/scratch_spaceWHZUKE/web/styles.css --content /home/justin/workspace/test/{lib,web}/**/*.dart
[BUILDER] [ERROR] Failed after 9.8s
[CLI] [ERROR] Failed building web assets. There is probably more output above.
Steps To Reproduce
jaspr create test
Select a rendering mode: ❯ ◉ static: Build a statically pre-rendered site. ◯ server: Build a server-rendered site. Select a rendering mode: static: Build a statically pre-rendered site. (Recommended) Enable automatic hydration on the client? (Y/n) Yes Setup routing for different pages of your site? (Y/n) Yes (Recommended) Use multi-page (server-side) routing? Choosing [no] sets up a single-page application (Recommended) Use multi-page (server-side) routing? Choosing [no] sets up a single-page application with client-side routing instead. (Y/n) Yes Setup Flutter web embedding? (y/N) No Enable support for using Flutter web plugins in your project? (Y/n) No ✓ Generated 25 file(s) (0.2s)
- Follow https://docs.page/schultek/jaspr/eco/tailwind#setup
jaspr serve
- See error
- Check and see the
styles.tw.css
file is actually therecat /tmp/scratch_spaceWHZUKE/web/styles.tw.css @tailwind base; @tailwind components; @tailwind utilities;
Doctor Output
[✓] Jaspr CLI (Version 0.13.1)
• Dart Version 3.4.0 (stable) (Wed May 15 07:03:28 2024 +0000) on "linux_x64" at dart
• Running on linux Linux 6.9.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 - Locale en_US.UTF-8
• Analytics: Enabled
[✓] Current Project
• Dependencies on core packages:
• jaspr: ^0.13.1
• jaspr_builder: ^0.13.1 (dev)
• jaspr_router: ^0.4.2
• jaspr_tailwind: ^0.2.0 (dev)
• Rendering mode: static
• Uses jaspr compilers: false
• Uses flutter embedding: false
BinaryShrub commented
I needed to install tailwind. Should we update the CLI to inform you when tailwindcss
DNE?
Happy to try and contribute, although you can probably crank it out quick? Let me know!
yay -S tailwind-css
then
jaspr clean
jaspr serve
BinaryShrub commented
schultek commented
Hi, yes I forgot to add it in the docs page. The installation instructions are in the package readme: https://pub.dev/packages/jaspr_tailwind#prerequisites
The recommended way is to use the standalone cli instead of node/npm. Can you please update the mr to have the same instructions as the readme.