ttntm/11ty-landing-page

Cannot build on WSL2 and Ubuntu

httpsterio opened this issue · 5 comments

When running npm run serve after doing a npm install, the build throws an error on writing the Eleventy templates.

page.11ty.js fails at some point. By removing the postcss plugins it will run successfully but obviously the CSS won't work.

When the Readme.md says that Tailwind is one of the dependencies, what does that actually mean? Does it need to be installed separately or is it included with the npm install or fetched and installed via postcss?

Doesn't build on Netlify either.

> Having trouble rendering 11ty.js template ./src/css/page.11ty.js

`TemplateContentRenderError` was thrown
> Cannot convert undefined or null to object

`TypeError` was thrown:
    TypeError: Cannot convert undefined or null to object
        at Function.entries (<anonymous>)
        at matchUtilities (/home/sami/projects/11ty-landing-page/node_modules/tailwindcss/lib/util/processPlugins.js:131:37)
        at /home/sami/projects/11ty-landing-page/node_modules/tailwindcss/lib/plugins/blur.js:15:5
        at /home/sami/projects/11ty-landing-page/node_modules/tailwindcss/lib/util/processPlugins.js:99:5
        at Array.forEach (<anonymous>)
        at _default (/home/sami/projects/11ty-landing-page/node_modules/tailwindcss/lib/util/processPlugins.js:93:11)
        at /home/sami/projects/11ty-landing-page/node_modules/tailwindcss/lib/processTailwindFeatures.js:64:54
        at LazyResult.runOnRoot (/home/sami/projects/11ty-landing-page/node_modules/postcss/lib/lazy-result.js:339:16)
        at LazyResult.runAsync (/home/sami/projects/11ty-landing-page/node_modules/postcss/lib/lazy-result.js:391:26)
        at async module.exports.render (/home/sami/projects/11ty-landing-page/src/css/page.11ty.js:18:12)
ttntm commented

Hi, thanks for opening this issue.

Just tested myself and getting the same error if I do the following:

  1. use the template = fork into a new repo
  2. clone locally
  3. npm install
  4. npm run serve

It seems to be caused by something that's changed in Tailwind, workaround is installing the version that this template was built with originally: np install tailwindcss@2.0.4 - if you do that, it builds without any errors.

No idea what has changed in Tailwind@2.2.2, so I'm leaving this issue open as a reminder.

It works up to 2.1.4. It looks like when this PR was added to 2.2.0 it broke something: tailwindlabs/tailwindcss#4232

It turns out the problem was that the tailwind.config.js was missing properties like saturate and sepia. Diffing against https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/defaultConfig.stub.js will give an idea of what's missing.

ttntm commented

Wow, thanks @johnkmzhou!

I'll update the config and publish a fix commit asap.