Type error in tailwind.config.js
Answered
Laysan Albatross posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Laysan AlbatrossOP
when including @catppuccin/tailwind to my tailwind config, I get a typing error, and have no idea how I can fix this.
// @ts-check
/** @type {import("tailwindcss/types").Config } */
module.exports = {
content: ['./app/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,tsx}', '.css/**/*.css'],
theme: {},
safelist: [
// this is for demonstration purposes only, not required for basic usage
{
pattern: /bg-.+/,
},
],
plugins: [
require('@tailwindcss/forms'),
require('@catppuccin/tailwindcss')({
prefix: 'one',
defaultFlavour: 'mocha',
}),
],
}
![Image](https://cdn.discordapp.com/attachments/1208805697752535040/1208805698121502721/image.png?ex=65e49f08&is=65d22a08&hm=c99f7c0f9d0a8051d9fc6feff7eb44c86826cf70bf57d16e7efb1d53daab73b4&)
Answered by joulev
detailed explanation and fix is posted in the [original issue](https://github.com/catppuccin/tailwindcss/issues/18).
tl;dr: this is a library bug. you can workaround by using
tl;dr: this is a library bug. you can workaround by using
tailwind.config.ts
instead where you can use esm syntax (i wouldn't even consider this a workaround, .config.ts
>> .config.js
)3 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Laysan AlbatrossOP
It works when including // @ts-nocheck to the config, but thats no fix, thats just ignoring the error ^^
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
detailed explanation and fix is posted in the [original issue](https://github.com/catppuccin/tailwindcss/issues/18).
tl;dr: this is a library bug. you can workaround by using
tl;dr: this is a library bug. you can workaround by using
tailwind.config.ts
instead where you can use esm syntax (i wouldn't even consider this a workaround, .config.ts
>> .config.js
)Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Laysan AlbatrossOP
yess, works tysm 🙂