I already have Composer and XAMPP installed.
But when I try to use composer create-project laravel/laravel example-app command to create a new project by using Composer directly I throws some errors
C:\Users\HP>composer create-project laravel/laravel example-app
Creating a "laravel/laravel" project at "./example-app"
Installing laravel/laravel (v9.1.10)
- Installing laravel/laravel (v9.1.10): Extracting archive
Created project in C:\Users\HP\example-app
In CreateProjectCommand.php line 497:
chdir(): No such file or directory (errno 2)
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]
C:\Users\HP>
I have tried:
Reinstalling Composer
Changing folder where I want to create my project
Using the composer global require laravel/installer
I'm using Composer version 2.3.7 and PHP Version 8.1.6. Im trying to install laravel 9 and my XAMPP is version 3.3.0
Did you try this ?
composer self-update
Same issue
Or you should change your installation directory.
cd desktop
Related
When I try to run composer update | composer install | composer require, I got this error on the Production server:
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may
be getting outdated dependencies. Run update to update them.
Package operations: 19 installs, 55 updates, 0 removals
In Filesystem.php line 182:
/var/www/html/vendor/kylekatarnls/update-helper does not exist and could not be created.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-
installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--
verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--
ignore-platform-reqs] [--] [<packages>]...
I'm trying to install laravel 5.7 by using this command
> composer create-project --prefer-dist laravel/laravel new_project dev-develop
But it's reflecting following error, also i disabled antivirus and firewall.
Installing laravel/laravel (dev-develop
b0651d2467f1428eadc505e1b3b4f5678611927c)
- Installing laravel/laravel (dev-develop develop): Loading from cache Created project in new_project
#php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating
dependencies (including require-dev) Package operations: 71 installs,
0 updates, 0 removals
- Installing vlucas/phpdotenv (v2.5.1): Downloading (failed) Downloading (failed) Downloading (failed) Failed to download
vlucas/phpdotenv from dist: The
"https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e"
file could not be downloaded : SSL operation failed with code 1.
OpenSSL Error messages: error:1416F086:SSL
routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto failed to open stream: operation failed
Now trying to download from source
- Installing vlucas/phpdotenv (v2.5.1): Cloning 8abb4f9aa8
[RuntimeException] Failed to clone
https://github.com/vlucas/phpdotenv.git via https,ssh protocols,
aborting.
- https,ssh://github.com/vlucas/phpdotenv.git
Cloning into 'D:\xamppro\htdocs\neologicx.com\new_project\vendor\vlucas\phpdotenv'...
fatal: I don't handle protocol 'https,ssh'
create-project [-s|--stability STABILITY] [--prefer-source]
[--prefer-dist] [--repository REPOSITORY] [--repository-url
REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers]
[--no-scripts] [--no
-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
OpenSSL Installed
and enabled
Okay, my problem resolved by removing '%temp%' files from windows.
After that i got content-length mismatch problem resolved from this Composer Content-Length Mismatch
And then again i tried this "composer create-project laravel/laravel laravelproject1" it worked.
Thanks Alot everyone.
composer global require "laravel/installer"
--
laravel new myProject
Run these commands in order and you should be fine.
If you prefer to use the composer create project command, then run this:
composer create-project --prefer-dist laravel/laravel blog
try composer clear-cache then composer self-update
Please try this.
install laravel 5.7:
composer create-project laravel/laravel laravelproject1
I'm trying to install laravel in opt/lampp/htdocs directory and get this error:
$ composer create-project --prefer-dist laravel/laravel blog
Installing laravel/laravel (v5.3.16)
[ErrorException]
mkdir(): Permission denied
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
I'm using Ubuntu 16.04
Can anyone help?
you need to make it withsudo
sudo composer create-project --prefer-dist laravel/laravel blog
i have installed composer using composer-setup.exe
then after i am trying to install laravel from cmd using composer.
my cmd command are like:
"F:\Websites>composer create-project laravel/laravel l5"
and it gives me error like :
[ErrorException]
chmod(): No such file or directory
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
I am using create-project command with composer
i think you are missing something there..
try this and you are good to go..
composer create-project --prefer-dist laravel/laravel yourDirectory
its from official documentation
I was following a tutorial on Lynda.com, and I am completely new to the composer/laravel scene. The tutorial told me to install the MCrypt libarary, which I did successfully from this package:
topicdesk.com/downloads/mcrypt/mcrypt-download
Composer seems to be successfully installed/running.
I then went ahead and opened terminal, and put in the following command:
composer create-project laravel/laravel first_app --prefer-dist
Which resulted in the following error:
Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
create-project [-s|--stability="..."] [--prefer-source]
[--prefer-dist] [--repository-url="..."]
[--dev] [--no-dev] [--no-plugins]
[--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs]
[--no-install] [package] [directory] [version]
Any ideas on what the issue may be? After looking around on the forums, it seems to me that it is a very case specific issue. Where do I begin in finding what may be preventing it from working correctly?