Laravel 5.7 post-install-cmd - laravel

I use Laravel 5.7 and would like to install a new Laravel project with the laravel new command.
laravel new myproject
After running this command I get the following error:
[InvalidArgumentException] Script "post-install-cmd" is not defined in
this package
run-script [--timeout TIMEOUT] [--dev] [--no-dev] [-l|--list] [--][][]...
Any ideas?

You should try first:
composer global update
In order to update Laravel installer. If for some reason that fails, I would try using composer to create new project. Docs are here.

composer create-project --prefer-dist laravel/laravel myproject "5.7.*"

You could use:
composer create-project --prefer-dist laravel/laravel myproject

Related

How to install lumen 5.8 using Composer

My source project contains laravel/lumen 5.8 and I cloned the project recently and installed composer and when I try to install lumen in this way
composer global require "laravel/lumen-installer"
I got the latest one . How can I get Laravel/lumen 5.8 using composer or any other methods?
You can create project as
composer create-project --prefer-dist laravel/lumen=5.8 myproject
Go to your app and then find composer.json and add this line:
"laravel/lumen-framework": "5.8.*"
then run
composer update

installation of composer on shared hosting

I have installed composer on shared hosting.
It's successfully installed on my shared hosting.
I have followed this tutorial for installation.
Link :- https://www.globo.tech/learning-center/laravel-under-cpanel/
Screenshot after installation.
I have used below command and it's working fine for me.
php composer.phar
But when I tried to install laravel in my public_html directory using below command,
composer create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
It's not working. It shows composer command not please find below screenshot for error.
Please let me know what I'm missing while installing composer.
Use the command php composer.phar create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
and make sure you execute the command from the directory where compser.phar exists.

Composer installing wrong laravel version

i have been creating a few Laravel 5.1 and 5.2 projects.
Now i wanted to try 5.3.
when installing a new project using
composer create-project laravel/laravel my-new-project
and the project was installed, i noticed this was still a Laravel 5.2 project structure.
How to fix this?
What version of PHP are you running?
Laravel53 uses php >5.6
Composer will fallback to Laravel52 incase you do not have the correct dependancies.
If this does not solve the problem, you can always run the command as such:
composer create-project laravel/laravel=5.3.0 my-new-project --prefer-dist
You can also mention the specific version you want by running the following
composer create-project laravel/laravel=5.3 your-project-name --prefer-dist

Create Laravel project with composer not working

I installed with success composer.phar in my computer but when I try to create a Laravel project with composer I have this error "exportnot open input file: path". Here you can see a print of terminal:
How can I fix it?
Try it like this:
php composer.phar create-project laravel/laravel IsabellProgetto
Try like this:
composer create-project --prefer-dist laravel/laravel your-project-name "5.2.*"
composer create-project laravel/laravel newproject

How to install Laravel 4 using composer

When laravel 5 is not yet released, I install Laravel 4 using this command composer create-project laravel/laravel your-project-name --prefer-dist. But now when I use it, It installs laravel 5. I just want to use laravel 4, not yet ready for 5.
I've tried the other answers but doesn't work for me. So here's the command I use.
composer create-project laravel/laravel=4.1.27 your-project-name --prefer-dist
Source :
Installing specific laravel version with composer create-project
UPDATE
Laravel updated the installation docs of 4.* after releasing 5.
composer create-project laravel/laravel {directory} 4.2 --prefer-dist
Source: http://laravel.com/docs/4.2#install-laravel
If nothing specified composer create-project will get the latest stable version. You can change that by just specifying the version you want:
composer create-project laravel/laravel project-name ~4.2.0 --prefer-dist
This will install the latest 4.2.* version of laravel
You should download latest laravel 4.2 release from github - https://github.com/laravel/laravel/releases/tag/v4.2.11
then use composer update to download all relevant packages including latest laravel version
I use Alternate Method.
Docs says Alternate Method
Once Composer is installed, download the 4.2 version https://github.com/laravel/laravel/archive/v4.2.11.zip of the Laravel framework and extract its contents into a directory on your server. Next, in the root of your Laravel application, run the php composer.phar install (or composer install) command to install all of the framework's dependencies. This process requires Git to be installed on the server to successfully complete the installation.
If you want to update the Laravel framework, you may issue the php composer.phar update command.
U can use this
composer create-project laravel/laravel {directory} 4.2 --prefer-dist
replacing {directory} with the actual directory of your project

Resources