Framework: Clean install error

Created on 31 Aug 2017  Â·  18Comments  Â·  Source: laravel/framework

  • Laravel Version: 5.5.0
  • PHP Version: 7.0.9
  • Database Driver & Version: latest mysql server

Description:

Hello,
When I create a new project, I get an error in the console.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump You made a reference to a non-existent script @php artisan package:discover You made a reference to a non-existent script @php artisan key:generate

Steps To Reproduce:

laravel new <projectname>

Most helpful comment

I found running composer global update as solution for this issue, but actually running composer global self-update solved the issue for me

All 18 comments

Make sure you have the latest version of laravel/installer by running composer global update

I have the same issue on a brand new install of laravel/installer on Centos 7.

Edit: Apologies - composer was out of date.

I'm having the same issue on Ubuntu 17.04, with PHP 7.0.22, again, a brand new install.

Update your laravel installer.

It is updated, it's freshly installed, and composer global update confirms that there is no update available.

@ThomasRedstone Is your Composer up to date?

I found running composer global update as solution for this issue, but actually running composer global self-update solved the issue for me

composer global self-update returns Command "self-update" is not defined

Running composer -V return Composer version 1.2.2 2016-11-03 17:43:15

@jhourlad Try composer selfupdate or re-install manually with your package manager.

This is because of your Laravel Installer or Composer version. I have faced the same problem and found following 2 different solutions:

  1. Generally you can solve with by running composer global update command and then run composer update command from your project directory. This solution basically updates your installer and then your project.

  2. If still, you have this issue, you need to run composer self-update command first and then run composer update command from your project directory. Here your composer will update and then your project.

Hope this information will help you.

I'm having the same issue as well as it stopping spark fully installing too.

Composer version 1.2.2 2016-11-03 17:43:15
Laravel Spark Installer 1.2.0
Laravel Installer 1.4.1

composer =
Command "selfupdate" is not defined.
Command "self-update" is not defined.

phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
Generating optimized autoload files
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

IlluminateFoundationComposerScripts::postAutoloadDump
You made a reference to a non-existent script @php artisan package:discover
Application ready! Build something amazing.

typing php artisan brings this error Class 'AppProvidersSparkServiceProvider' not found

Running Ubuntu 17.04

Alright lads,

https://github.com/laravel/framework/issues/20843#issuecomment-326100763 <- that solved it for me. Composer was out of date oddly.

Hope it helps you.

Hey Lads,
If you remove the "@" from in front of the line "@php artisan ...." from your composer.json file the problem will go away.

@dPhantum – Using the latest composer solves that, as composer will resolve @php to the correct PHP path… That’s my experience anyway.

Same problem, and i can confirm that if you change "@php.." with "php...", it works. Thanks

As stated previously, make sure you're running the latest composer and laravel installer. No need to change any code.

I had the same issue and I fixed it by changing composer.json:

Change "@/usr/local/bin/php artisan package:discover"

To "/usr/local/bin/php artisan package:discover"

Doesn't even solved after trying those methods,While installing Laravel/Dusk I get this errors,and could'n fix it properly,So I have Uninstalled dusk.I will glad if anyone can help me to solve this problem.

First one
___masterplaygroundvendorcomposer/../php-webdriver/webdriver/lib/Exception/TimeoutException.php): failed to open stream: No such file or directory_
and second one
_autoload_rea.php line number 71._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jackmu95 picture jackmu95  Â·  3Comments

PhiloNL picture PhiloNL  Â·  3Comments

klimentLambevski picture klimentLambevski  Â·  3Comments

ghost picture ghost  Â·  3Comments

iivanov2 picture iivanov2  Â·  3Comments