Composer installation fails and reverts ./composer.json and ./composer.lock to original content

35 views Asked by At

I have a project that I've created with Laravel 10. After publishing my project, I encountered a CORS error in the console on the client side, which uses React. Despite trying many methods, I was unable to resolve the issue. While researching, I found a package called FruitCake CORS but encountered an error when I tried to install this package. Can you help?

I've tried many methods but couldn't resolve the issue on the published website. This was the only method left, resulting in an error when I tried to install it with Composer.

1

There are 1 answers

0
Gych On

This package doesn't support Laravel 10 and is deprecated as stated in the package's Github readme.

This package is deprecated because all supported Laravel versions now include the CORS middleware in the core.

Check this link from the Laravel docs for info on how you can configure CORS https://laravel.com/docs/10.x/routing#cors