laravel 创建新项目时出现

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 --ansi

因为这一步没有做,运行项目后报错,大概就是说项目没有指定key
QQ浏览器截图20190415103553.png

解决办法:

执行这条命令,更新一下composer

composer self-update