Skip to content
Advertisement

Laravel 9 composer syntax error, unexpected token “)”

After in my Laravel 9 project I run composer update I faced this error message:

JavaScript

It seems update was finished, but something went wrong and now in the console I get syntax error, unexpected token ")" error on Finder.php:588.

I checked this file and it’s looks correct.

When I open my project in browser I get this error:

JavaScript

I cleared all the caches in bootstrap/cahce/ and in storage/framework/cache/data/, storage/framework/sessions/, storage/framework/views/ folders too.

I use PHP version 8.0.16.

Composer version 2.0.12 2021-04-01 10:14:59.

Any idea how can I fix this?

Advertisement

Answer

I found a soution:

  1. upgrade to PHP 8.1
  2. run docker pull composer to upgrade latest version of composer (from 2.0 to 2.2)
  3. run composer update in Docker container
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement