Wednesday, November 1, 2017

Laravel non-existent script error

Recently updated to PHP 7.1 and all the existing PHP projects are working fine.

However, this error appeared when I am trying to create a new Laravel 5 project,

You made a reference to a non-existent script @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
. . .

You made a reference to a non-existent script @php artisan key:generate

Lets fix this in one step;

Step 1: Update the composer,

$ composer self-update

Updating to version 1.5.2 (stable channel).
    Downloading: 100%
Use composer self-update --rollback to return to version 1.2.2

Run the command used to create the new project,

$ composer create-project laravel/laravel myapps

No comments:

Blog Archive