Tam Mains
Tam Mains

Reputation: 29

Laravel Tailwind authentication scaffolding issue

So I am currently playing around with Laravel and Tailwind. I have created a project and working through some initial views. The next to do was to add auth scaffolding to the project.

I tried Googling around, found https://aregsar.com/blog/2020/create-laravel-project-with-tailwind-ui-and-auth/. I also checked a couple of other results which had the same pointers.

So when I run composer require laravel-frontend-presets/tailwindcss --dev, no problems. Next up I run the following.

php artisan ui tailwindcss --auth
Tailwind CSS scaffolding installed successfully.
Tailwind CSS auth scaffolding installed successfully.
Please run "npm install && npm run dev" to compile your fresh scaffolding.

No issues...however, when I try and run npm install, I get the following...

npm install && npm run dev

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: undefined@undefined npm ERR! Found: [email protected] npm ERR! node_modules/tailwindcss npm ERR!
dev tailwindcss@"^2.2.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer tailwindcss@"^1.3.3" from @tailwindcss/[email protected] npm ERR! node_modules/@tailwindcss/ui npm ERR!
dev @tailwindcss/ui@"^0.3" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /home/tam/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR!
/home/xxx/.npm/_logs/2021-07-26T19_33_44_249Z-debug.log

Stuck here. It's a pity as I prefer Tailwind to Bootstrap.

Upvotes: 2

Views: 3112

Answers (1)

user633440
user633440

Reputation:

@tailwindcss/ui is no longer needed. Uninstall the @tailwindcss/ui package.

npm uninstall @tailwindcss/ui

Install latest dependencies for Laravel Mix, Autoprefixer, and PostCSS.

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

Finally, make sure the line...

require('@tailwindcss/ui'),

Is removed from your tailwind.config.js file.

Continue on with your compilation.

npm install && npm run dev

Upvotes: 4

Related Questions