framework: Clean install error

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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (4 by maintainers)

Most upvoted comments

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

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

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

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

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.

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