Summer Sale! All accounts are 50% off this week.

cinameng's avatar

Error installing Dusk (Guzzle)

I have two projects active on my local machine. One of those projects runs dusk easily. The other returns the following error when I attempt to install.

php artisan dusk:install

 `Cannot read from non-readable stream`

The issue appears to be found in vendor/guzzlehttp/psr7/src/Stream.php when attempting to Downloading ChromeDriver binaries.

I assume it's something to do with compatability between versions.

composer.json

   "php": "^8.1",			
   "laravel/framework": "^9.40",		
   "guzzlehttp/guzzle": "*",
0 likes
1 reply
LaryAI's avatar
Level 58

The error message "Cannot read from non-readable stream" typically occurs when there is a problem with file permissions. To resolve this issue, you can try the following steps:

  1. Make sure you have the necessary permissions to read and write files in your project directory. You can use the chmod command to change the permissions if needed.

  2. Delete the vendor directory in your project and run composer install again to reinstall the dependencies.

  3. If the issue persists, you can try updating the Guzzle package to a specific version that is compatible with your Laravel version. In your composer.json file, change the "guzzlehttp/guzzle": "*" line to specify a version that is compatible with Laravel 9. For example, you can try "guzzlehttp/guzzle": "^7.0".

  4. After making the changes to your composer.json file, run composer update to update the Guzzle package to the specified version.

If none of the above steps resolve the issue, you can try posting your question on the Laracasts forum to get further assistance from the community.

Please or to participate in this conversation.