Search code examples
phpcomposer-phpsymfony4

Script cache:clear returned with error code 255


I installed Symfony 4.2 via composer

composer create-project Symfony/website-skeleton my-project

everything works correctly, then I put the project in gitlab. a friend of mine tried to clone it on its own computer in order to work on the same project, and when he runs composer install

he got an error :

Script cache:clear returned with error code 255

Frankly, I tried everything I can find on the web and Stack Overflow but unfortunately, i didn't succeed.

Thanks in advance for any help


Solution

  • First: How I got the error:

    1. I have a symfony 4.2 installed application in a folder called my-project
    2. I copied the content of the project to another folder called my-App using CTRL-C then CTRL-V (copy-paste)
    3. I put it to my gitlab project
    4. My friend cloned the project and run Composer install and He got the Error "Script cache:clear returned with error code 255"

    Second: How I solved this:

    1. Actually, when you make a CTRL-C and CTRL-V to the content of the symfony project folder, you are not copying everything, all the .files (dot files example .env, .test, .gitignore) are hidden.

    2. in order to copy the other hidden files such as .env you should open your terminal and type "cp .env (to your location)" in my case, it was "cp .env ~/Desktop/newApp"

    Hint: in order to display all the folders and files in a folder use "ll" (ll: aliased to "ls -lh") instead of "ls" command.