Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed composer's invalid argument exception #4399

Closed
wants to merge 1 commit into from

Conversation

mmkjony
Copy link

@mmkjony mmkjony commented Aug 30, 2017

Fixing a conflict with the latest composer while installing a new laravel 5.5.0 project.
Solving composer's exeption:
"[InvalidArgumentException]
Script "post-install-cmd" is not defined in this package"

And, added a script to show the installed laravel version.

Fixing a conflict with composer while installing a new laravel 5.5.0 project.
Solving composer's exeption: 
"[InvalidArgumentException]
  Script "post-install-cmd" is not defined in this package"

And, added a script to show the installed laravel version.
@antonkomarev
Copy link
Contributor

Great idea about version!

@ghost
Copy link

ghost commented Aug 31, 2017

i dont have that error

Generating optimized autoload files
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
You made a reference to a non-existent script @php -r "file_exists('.env') || copy('.env.example', '.env');"
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
You made a reference to a non-existent script @php artisan key:generate
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
You made a reference to a non-existent script @php artisan package:discover
Application ready! Build something amazing.

only the env file is not generated
its because the @ sign
any idea what that symbol means for ?

@taylorotwell
Copy link
Member

You just need to update your Laravel installer, as noted in release notes.

@gayansanjeewa
Copy link

I just got the same Issue. Thanks @taylorotwell for your comment. I forgot to do a composer global update before the laravel new <project-name>. Once I did that, It's all good. Long live L5.5 ;)

@antonkomarev
Copy link
Contributor

antonkomarev commented Aug 31, 2017

@laravelish https://getcomposer.org/doc/articles/scripts.md#executing-php-scripts
Try to update composer to latest version.

@ghost
Copy link

ghost commented Aug 31, 2017

@a-komarev thanks for the info, i had installed composer through apt-get which is using the version 1.1.3
i did not know it was using a old version.. time to install it from https://getcomposer.org/installer

@jo2k
Copy link

jo2k commented Sep 1, 2017

I was getting that exception error until I updated Composer with composer global update. Now I can do laravel new blog and it works without errors, all the way, including setting the application key.

It would be nice if the Laravel installer's message was a bit more specific, especially for us newbies to Laravel and Composer.

@imkane
Copy link

imkane commented Nov 23, 2019

This is happening to me with Laravel 6.*. I did "composer global update" too, but that didn't help :(

Edit:
This command:
laravel new myproject
Results in:

[InvalidArgumentException]
  Script "post-install-cmd" is not defined in this package

However this command:
composer create-project --prefer-dist laravel/laravel myproject
WORKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants