Create Laravel project with composer not working - laravel

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

Related

how can i solve this laravel project installation problem?

When I try to install a new project in my htdocs folder in that time i get this error:
[Composer\Repository\InvalidRepositoryException] Invalid repository
data in C:\xampp\htdocs/vendor/composer/installed.json, packages could
not be loaded: [Seld\Json Lint\ParsingException]
"C:\xampp\htdocs/vendor/composer/installed.json" does not contain
valid JSON Parse error on line 1:
\\\\\\\\\\ ^ Expected one of: 'STRING', 'NUMBER', 'NULL',
'TRUE', 'FALSE', '{', '['
My installation command is:
composer create-project --prefer-dist laravel/laravel CruiseBag "5.6.*"
Install Laravel on Windows
Download Composer’s Windows .exe installer:
https://getcomposer.org/download/
Run the installer
Open Window’s CMD or PowerShell
cd C:\xampp\htdocs
Install Laravel using Composer
composer create-project --prefer-dist laravel/laravel CruiseBag "5.6"
See
// first composer download, then composer install
// Or command use:
composer global require "laravel/installer"
//then
composer create-project --prefer-dist laravel/laravel blog "5.6.*"

Laravel 5.7 post-install-cmd

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

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.

Installing Laravel 5 on CentOS

I'm trying to install larvel 5 on my vps(the os is centos) and when I run the command
php composer.phar create-project laravel/laravel --prefer-dist
I get this result
Installing laravel/laravel (v5.0.22)
- Installing laravel/laravel (v5.0.22)
Loading from cache
then it's stop !
Not sure why your cache is failing, but did you try using source instead of distr?
php composer.phar create-project laravel/laravel --prefer-source

Install Older Version of Laravel using Composer

How do I install older version of Laravel framework using composer? The current version is 4.1 and I want to install Laravel 4.0.
either update your composer.json to what GregD mentioned or fetch it directly with
composer create-project laravel/laravel your-project-name 4.0.*
prefer this, as there can be some caveats when getting version 4.1 and wanting to downgrade (or even upgrade).
Finally it works, I just did four things:
composer create-project laravel/laravel mobilebanking 4.0
Change "dev" to "stable" in composer.json
Then run
composer self-update
After that, run this command
composer update --no-scripts
composer create–project laravel/laravel MiProyecto 5.3.* o
composer create–project laravel/laravel=5.3.* MiProyecto
Browse packagist - https://packagist.org/packages/laravel/laravel
Find version you need and add it to composer i.e.
"require": {
"laravel/laravel": "v4.0.0",
},
Install it like this:
composer create-project laravel/laravel path/to/your/directory version
For Laravel versions 5.5 it looks like this:
composer create-project laravel/laravel path/to/your/directory 5.5

Resources