Laravel 8, Tailwind CSS init

Viewed 1291

I have tried to install Tailwind CSS. I have run the following command.

npm install -D tailwindcss
npx tailwindcss init

However, I have an error.

Unexpected token {

Maybe someone had the same mistake. I have an empty Laravel instance and I want to add tools for the UI.

2 Answers

First, make sure you have the latest package versions.

npm install -D laravel-mix@latest tailwindcss@latest postcss@latest autoprefixer@latest

Here is the issue

Actually the problem is with node/npm version. Try to upgrade the node version which is compitale with tailwindcss.

Related