#"could not determine executable to run" - After running npx tailwindcss

1 messages · Page 1 of 1 (latest)

arctic axle
#

I tried to make a new dx project for web & desktop
but when I try to "npx tailwindcss" I'm having this error.
I'm on win 11. . thank you!

npx tailwindcss -i input.css -o assets\tailwind.css --watch
npm error could not determine executable to run
arctic axle
#

found on Tailwind V4 to use this command instead:

  npx @tailwindcss/cli -i input.css -o assets/tailwind.css --watch

Okay I think its now working, but I'm still not sure.

because when I try to add a custom fontFamily, the font does not update.

tailwind config:

/** @type {import('tailwindcss').Config} */
module.exports = {
  mode: "all",
  content: ["./src/**/*.{rs,html,css}", "./dist/**/*.html"],
  theme: {
    extend: {
      fontFamily: {
        body:["Fira Code"]
      }
    },
  },
  plugins: [],
};

input.css

@import url("https://fonts.googleapis.com/css2?family=Fira+Code&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

Also used it in the component to test it:
main.rs:

fn Container() -> Element {
  rsx! {
    div {
      class: "font-body w-screen h-screen flex flex-col items-center justify-center",
      "TEST HI HELLO!"
    }
  }
}

what am I missing?

arctic axle
#

Okay found the solution again 🤦‍♂️:
I added a line on input.css

@theme {
  --font-body: "Fira Code";
}
arctic axle
#

some classes are not working tho, tailwind seems to be working, but now fully. im not sure why?

hardy atlas
grim onyx
#

The solution was to add the classes to the extend struct in the tailwind.config.js file