Search code examples
phplaravel-artisanlaravel-5.5

Laravel 5.5 - Issues creating new project


I'm trying to use Laravel 5.5. I updated my php 7.0 to php 7.1. Even, I update my laravel installer package. But, when I try to do:

laravel new myProject

I get this error:

You made a reference to a non-existent script @php -r "file_exists('.env') || copy('.env.example', '.env');" You made a reference to a non-existent script @php artisan key:generate Illuminate\Foundation\ComposerScripts::postAutoloadDump You made a reference to a non-existent script @php artisan package:discover

I am using laravel valet and if I go to the browser, when I try myProject.dev is not working. I see this error:

Whoops, looks like something went wrong.

I tried using:

php artisan key:generate

inside my project, but I got that:

[ErrorException]
file_get_contents(/Users/jorgeJimenez/Sites/laravel5-5/.env): failed to ope n stream

: No such file or directory

I noticed, my laravel 5.4 projects are working. I copied a .env file and I put on my laravel 5.5 projects. After that, I run

php artisan key:generate

and the key was generated and my project in the browser works. It's supposed, all that process is automatic, but I am not quite sure what is happening.


Solution

  • You can try update your composer:

    composer self-update