Tuesday, October 25, 2022
HomeWordPress Development Inner server error: Can't learn properties of undefined (studying 'size') for...

[vite] Inner server error: Can’t learn properties of undefined (studying ‘size’) for Tailwind and PostCSS.


Disclaimer: this isn’t a repair however somewhat a fast hack, in order that, for example, you would possibly proceed constructing.

Drawback: You have simply put in TailwindCSS however you get the error beneath in addition to some indication that it would associated to the PostCSS config.

$ [postcss] Can't learn properties of undefined (studying 'config')
$ [vite] Inner server error: [postcss] Can't learn properties of undefined (studying 'config')
Enter fullscreen mode

Exit fullscreen mode

Fast Hack: Copy the content material of module.export within the tailwind.config.js file into the worth of the tailwindcss property within the postcss.config.js file. Your last consequence ought to seem like this:

./postcss.config.js

1  module.exports = {
2   plugins: {
3    tailwindcss: {
4       content material: [
5         "./index.html",
6         "./src/**/*.{vue,js,ts,jsx,tsx}",
7       ],
8       theme: {
9         lengthen: {},
10      },
11      plugins: [
12        require('@tailwindcss/forms'),
13      ],
14    },
15    autoprefixer: {},
16  },
17 }

Enter fullscreen mode

Exit fullscreen mode

That ought to do the hack. Cheers.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments