Why i can't create a new project from github using composer? - codeigniter

I have created a new repository on GitHub. I have used GitHub Desktop to commit all files. All is done. But I can't create a new project with Composer.
Here is my repository:
https://github.com/xttrust/CodeIgniter-HMVC-EXTRA
I have tried to create a new project like this:
composer create-project xttrust/CodeIgniter-HMVC-EXTRA
I get this error in GitBash:
[InvalidArgumentException]
Could not find package xttrust/codeigniter-hmvc-extra with stability stable.
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] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

As Chris mentioned in a comment:
Have you submitted it to Packagist?
I had to merge it with Packagist, and it then worked.

No issue as the error is correct. Try searching Packagist. You will need to submit your github repo https://github.com/xttrust/CodeIgniter-HMVC-EXTRA

Related

Error when trying to install Laravel Via Composer

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

Error installing Laravel: [ErrorException] file_get_contents(): read of 8192 bytes failed

This is the error:
Generating optimized autoload files
...
[ErrorException]
file_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--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] [--] [] [] [<version
...
This is usually a cache problem with composer. Either you have a slow connection (like me) or a process was interrupted during install/update.
Run composer clear-cache and try again. I hope this solves your problem.
Which PHP version are you using? cause this was a bug in PHP 7.4 as stated here :
https://bugs.php.net/bug.php?id=79166
Try using PHP 7.3, it should work fine

Hot to install laravel-vue-i18n-generator package?

I am trying to implement language translation in my app using the following plugin vue-i18n
I am following this documentation
https://github.com/martinlindhe/laravel-vue-i18n-generator
When I run the following code
composer require martinlindhe/laravel-vue-i18n-generator
in root#d722309335cd:/var/www#
I get the following error
root#d722309335cd:/var/www# composer require martinlindhe/laravel-vue-i18n-generator
Do not run Composer as root/super user! See https://getcomposer.org/root for details
---Using version ^0.1.30 for martinlindhe/laravel-vue-i18n-generator
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
[UnexpectedValueException]
/var/www/vendor/composer does not exist and could not be created.
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
What am I missing ?

Error installing Laravel on Ubuntu

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

Installation errors in Laravel using composer

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

Resources