0

I have a laravel 8 project that I need to make changes to. I installed laravel sail to start it but I get an error trying to install npm packages:

 sail npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: laravel-mix@6.0.18
npm ERR! Found: postcss@7.0.35
npm ERR! node_modules/postcss
npm ERR!   postcss@"^7.0.35" from the root project
npm ERR!   postcss@"^7" from @tailwindcss/postcss7-compat@2.0.3
npm ERR!   node_modules/@tailwindcss/postcss7-compat
npm ERR!     @tailwindcss/postcss7-compat@"^2.0.3" from the root project
npm ERR!   38 more (@types/cssnano, autoprefixer, css-declaration-sorter, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer postcss@"^8.1.2" from laravel-mix@6.0.18
npm ERR! node_modules/laravel-mix
npm ERR!   dev laravel-mix@"^6.0.18" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: postcss@8.4.20
npm ERR! node_modules/postcss
npm ERR!   peer postcss@"^8.1.2" from laravel-mix@6.0.18
npm ERR!   node_modules/laravel-mix
npm ERR!     dev laravel-mix@"^6.0.18" 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! 
npm ERR! For a full report see:
npm ERR! /home/sail/.npm/_logs/2022-12-21T17_56_37_398Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sail/.npm/_logs/2022-12-21T17_56_37_398Z-debug-0.log

sail node -v
v18.12.1

sail npm -v
9.2.0

UnderDog
  • 305
  • 1
  • 4
  • 14
blacky99
  • 115
  • 1
  • 12

0 Answers0