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

fix: tailwind with jaspr serve #242

Closed
BinaryShrub opened this issue Jun 12, 2024 · 3 comments
Closed

fix: tailwind with jaspr serve #242

BinaryShrub opened this issue Jun 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@BinaryShrub
Copy link

BinaryShrub commented Jun 12, 2024

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

  1. 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)
    
  2. Follow https://docs.page/schultek/jaspr/eco/tailwind#setup
  3. jaspr serve
  4. See error
  5. Check and see the styles.tw.css file is actually there
    cat /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 BinaryShrub added the bug Something isn't working label Jun 12, 2024
@BinaryShrub
Copy link
Author

BinaryShrub commented Jun 12, 2024

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
Copy link
Author

#243

@schultek
Copy link
Owner

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.

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

2 participants