how can i solve this laravel project installation problem? - laravel

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

Related

composer laravel install: “http://packagist.org” file could not be downloaded

I want to install laravel through composer with :
$ composer create-project --prefer-dist laravel/laravel DemoTest
but every time i do that composer shows a message:
[Composer\Downloader\TransportException] The
"http://packagist.org/p/provider-2013%244440cd3f9b7aec0de3e4f3486e61b7e348d74d03a0bd6a61b5b8a514e105
2c4d.json" file could not be downloaded: failed to open stream: HTTP
request failed!
Can you try
composer clear-cache
then
composer -vvv
after that try running the install command for laravel, it worked for me though

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

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

Resources