Laravel Symfony/console , installation failed because of "Invalid argument"?

Viewed 1555

Sorry if it seems like a nooby thing, but I am nooby at this composer/cmd thing.

I keep getting the same error while trying to install Laravel installer. The composer resists to install "symfony/console", it downloads it, but cannot load it. Any ideas why?

Just today it was working fine, few hours in I tried to create a new project and that's what I keep getting :

**[ErrorException]
copy(D:\Laravel\cr\vendor/symfony/console/b9a023bcb5ec9a752e17f3
f5c1358bfc): failed to open stream: Invalid argument**

enter image description here

Since the error I've tried reinstalling composer, deleting all of its data from Appdata\Roaming\Composer folder, tried to delete vendor folder from laravel project itself and install composer through bash once again. None helped, can't find similar answer to the question either.

2 Answers

I had the same issue. Windows Defender detected Trojan:Script/Foretype.A!ml on symfony/console (v5.1.7) After i disabled the Virus Protection i was able to finish the install.

You have to disable windows defender or other anti-virus programs; also, check you have proper permissions to the folder.

how to disable windows defender:

  • search setting in windows
  • click windows security, below you will see virus and threat protection
  • turn off real time protection, then create project in laravel, it will run with zero errors

enter image description here

Related