[SOLVED] New site package setup with tailwind

Hello Community,

I am pretty new to Typo3, but not to working with composer.
Currently I am trying to get a new project using Tailwind and the tailwind-styled-content extension going, but can’t even do the proper setup for a site package. After installing tailwind-styled-content on top of a fresh TYPO3 DDEV installation, I tried to first generate a minimal package using fluid-styled-content and then to edit the package’s “Configuration/Sets/SitePackage/config.yaml” like this:

name: PACKAGE_ID
label: 'PACKAGE_NAME'
dependencies:
  - jramke/tailwind-styled-content

Now the backend is telling me (Site Management → Sites) that my site set config is invalid due to a missing extension. After that I re-executed the command

ddev composer req jramke/tailwind-styled-content

but the error still persists. What am I missing?

Hey,

PACKAGE_ID is replaced with the extension key?

If yes, then a little bit more info is helpful. If you really follow the steps in the documentation, it should work.

Hi,

yes exactly. I left everything as is from the generator and just changed the line under dependencies. The exact error states:
“Site set ‘…’ is disabled: Missing dependency ‘jramke/tailwind-styled-content’”
I can’t imagine why this would be the case, as I see the package in the root composer.json and in the conposer.json of my site package (I included it there).
I don’t know which documentation you could possibly mean since there is essentially no generator for Tailwind based sitepackages, but I followed all other steps for “normal” sitepackages as mentioned there.

Try and add the jramke/tailwind-styled-content package to your site package composer.json - this will ensure that the dependency order is correct.

Despite that, the package you referring to, does not have a “Site set” that you can require from your own site package (not all have that). So remove that dependency from you config.yaml.

So instead, you must include the typoscript directly by having the following in your setup.typoscript

@import 'EXT:tailwind_styled_content/Configuration/TypoScript/setup.typoscript'

and similar in constants.typoscript

@import 'EXT:tailwind_styled_content/Configuration/TypoScript/constants.typoscript'

Thank you very much, sorry for my confusion with TYPO3 and TypoScript :+1:

Let me put it like this:

If the extension have had a Site set, you were doing it exactly like you should :ok_hand:

You were a bit ahead of time :wink:

1 Like