JeffreyWay / laravel-mix-tailwind

mix.tailwind()
347 stars 25 forks source link

Unable to install on fresh Laravel 8 Jetstream Inertia project #30

Closed fylzero closed 3 years ago

fylzero commented 3 years ago

Receiving a peer dependency error when attempting to install on fresh Laravel 8 Jetsream Inertia project.

Steps to reproduce...

# In parked Valet dir:

composer create-project --prefer-dist laravel/laravel="8.*" laravel8
cd laravel8

# Set up sqlite instead of mysql
touch database/database.sqlite
sed -i '' 's/mysql/sqlite/g' .env
sed -i '' 's/DB_/# DB_/g' .env
sed -i '' 's/# DB_CONNECTION/DB_CONNECTION/g' .env

composer require laravel/jetstream
php artisan jetstream:install inertia

npm install
npm run dev

php artisan migrate

git init
echo .DS_Store >> .gitignore
git add .
git commit -m 'Fresh Laravel 8 Install'

npm install laravel-mix-tailwind --save-dev

Following the above steps results in the following peer dependency error for me:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: laravel-mix@6.0.10
npm ERR! node_modules/laravel-mix
npm ERR!   dev laravel-mix@"^6.0.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev laravel-mix-tailwind@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: laravel-mix@2.1.14
npm ERR! node_modules/laravel-mix
npm ERR!   peer laravel-mix@"^2.1.7" from laravel-mix-tailwind@0.1.1
npm ERR!   node_modules/laravel-mix-tailwind
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 /Users/<My User Account Name>/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/<My User Account Name>/.npm/_logs/2021-01-23T17_41_39_348Z-debug.log
fylzero commented 3 years ago

Just noting this is related to/opened because of a separate issue in laravel-mix: https://github.com/JeffreyWay/laravel-mix/issues/2778

JeffreyWay commented 3 years ago

Can you bump to the latest patch release and let me know if that fixes your problem?

fylzero commented 3 years ago

@JeffreyWay I ran npm install laravel-mix-tailwind@latest --save-dev and no error. It did allow the install.