ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

[Build Error] [vite:css] [postcss] Cannot read properties of undefined (reading 'config')

Open Irene-123 opened this issue 2 years ago • 6 comments

Error message

Running the yarn dev command gives me this error.

image

So I searched on Google as it seemed a generic error and found this link to fix it.

Therefore, I added a file named tailwind.config.js in the root folder and pasted the recommended code over there. And it builds almost all packages but threw me an error at the end regarding the tauri private key.

image

I went through the .gitignore to check for a .env file if in case private key is being used by the developers. And I tried generating a private key by tauri installation but I'm not able to generate a private key or, maybe I don't know whether I need to use it or going on the right path to fix it.

Also, yes I found this issue on the tauri apps repository, but I couldn't understand what file I need to create.

Thankyou.

OS

Windows 11

Environment

No response

Irene-123 avatar Jan 03 '23 13:01 Irene-123

The problem with the sass compilation error comes from vite, which I will look into. Adding tailwind.config.js may solve the problem, but it is not the best solution.

Regarding the private key, as I answered here https://github.com/lencx/ChatGPT/issues/123, it can be completely ignored because it doesn't affect the build (it's a signature verification for automatic updates of the application).

lencx avatar Jan 03 '23 13:01 lencx

Yes, I've added the tailwind.config.js and after that, it gives me the error to private key

Irene-123 avatar Jan 03 '23 13:01 Irene-123

The private key error can be ignored, is there an installation package generated?

lencx avatar Jan 03 '23 14:01 lencx

Do you mean, installation package error? Else works fine, but this private key error doesn't the yarn build process complete.

Irene-123 avatar Jan 03 '23 15:01 Irene-123

You can set updater > active to false in tauri.conf.json.

lencx avatar Jan 03 '23 15:01 lencx

Works. Thank you. Shall I create a PR for this?

Irene-123 avatar Jan 03 '23 16:01 Irene-123

It only exists in your local development environment, because if you turn off updater, the application will disable automatic updates.

lencx avatar Jan 04 '23 00:01 lencx