"database/seeds" error when running "composer global require laravel/valet" - laravel

I'm running Ubuntu 18.04.4 LTS (Bionic Beaver).
I have installed Composer, Laravel, among other things on this server. I'm trying to run:
composer global require laravel/valet
It attempts to run, and outputs:
Changed current directory to /home/myUser/.config/composer Using version
^2.9 for laravel/valet ./composer.json has been updated Loading
composer repositories with package information Updating dependencies
(including require-dev) Nothing to install or update Generating
optimized autoload files
In ClassMapGenerator.php line 69:
Could not scan for classes inside "database/seeds" which does not
appear to be a file nor a folder
Where is/should this folder be, and why wouldn't it already be there anyway?

Laravel Valet is a MacOS utility, there are linux ports, such as this one, but it won't work on Ubuntu as it uses Homebrew under the hood, a package manager for MacOS.

Related

using Doctrine in localhost works well but after uploading to C-panel, below error accrued

Uncaught Error: Class "Symfony\Component\Cache\Adapter\ArrayAdapter" not found,
but Symphony cache and Doctrine cache has been installed,
my composer.json:
"doctrine/orm": "^2.11.0",
"doctrine/dbal": "^3.2",
"doctrine/annotations": "1.13.2",
"symfony/yaml": "^5.4",
"symfony/cache": "^5.4"
This is most likely because of version differences between your local and hosted environments, e.g. you might be running PHP 7.x locally and PHP 8.x on your hosted environment. This can be a bit of a struggle. The key things you need to know are:
composer.json keeps a list of packages that you have said that your project needs. This is usually listed as point revisions, e.g. 1.x, 2.x, 3.x
composer.lock lists the EXACT versions of the package that was installed when the composer install (or composer upgrade) command was used, e.g. 1.2.3
vendor/ is the resulting folder that was installed as the result of running composer install
When there is no composer.lock file, or composer upgrade is run, then composer will fetch the latest version of the available libraries based on the current environment, e.g. your local machine. If you then pick up the vendor/ folder and upload it to your hosted environment, it may contain code that isn't compatible with the environment there.
I see people recommending to delete the composer.lock and vendor folder on the production machine, and then run composer install again. This is likely to resolve the issue, but it glosses over the fact that the code you're running in production is then different to what you were developing locally. On shared hosting it may not be immediately obvious how to run composer install as you may need access to a shell (e.g. SSH connection)
There are two ways forward - either:
use your control panel to change the PHP version for your site to a version that you are running locally
change your local dev environment to run the same version of PHP that your hosting environment is running
Be sure to always run the same version of PHP on dev and production to avoid these kinds of problems, and take the time to understand the purpose of composer.lock and how it is used to populate the vendor/ folder with the exact code based on your current PHP version.

Cpanel Laravel package install getting "Killed"

I am try to install barcode package in my cpanel laravel project.But every time it gets killed.
command:
[......#host public_html]$ composer require milon/barcode
after few moment:
Using version ^7.0 for milon/barcode
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://repo.packagist.org/p/symfony/polyfill-iconv%24535e139d88ce6708c9d8bf795da669c3fe46467f4bc7dc900e2e65a8d77b56ae.json" file could not be downloaded: failed to open stream: Network is unreachable
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Killed
it also happening for all the packages I want to install like:pdf or others.Updated my composer.still not working.
It happens for a lack of memory of your server. You can install the package in your local machine then replace your server composer.lock file with the local's composer.lock file Then go to the terminal and run composer update.

Composer very slow on one computer, no problem on others

Been having issues on a particular Linux machine with the composer package manager. On this particular machine, it seems it can't download anything from repo.packagist.org/p. The download speeds I get are 10~15KB/s
Ubuntu 18.04
Composer 1.7.3
PHP 7.2
It appears to be a mirror issue (this machine not selecting different, if that's even a function)
The following solves it temporary:
composer config repositories.packagist.org composer https://repo-eu-uk-1.packagist.org

Laravel Installer method

Normally I do install Laravel 5.1 by following this command regarding to documentation:
composer create-project laravel/laravel --prefer-dist
It works fine.
But I read in the documentation under "Via Laravel Installer" also it is possible to install via Laravel Installer, which is much faster than installing via Composer:
laravel new blog
But to use this method I need to run following command once:
composer global require "laravel/installer=~1.1"
When I do run it I get following errors many times
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks
is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks()
instead in
phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:226
after many line of same error ./composer.json has been updated appears and it continues with the same line of errors, it ends with following
Loading composer repositories with package information Updating
dependencies (including require-dev) Nothing to install or update
Generating autoload files
What is wrong with it? Any idea or solution.
My environment: Windows 10, GitBash and cmder console.
Update of composer, I did ran composer self-update also
Snapshot of console
EDIT:
Note, I can confirm after solving the issue that the installation via Laravel Installer method is faster than composer.
The Composer Assets Plugin you've installed locally is using a deprecated method of Composer. The plugin is already fixed, so run composer global update to get the latest versions with the bug fix. After it, you should be able to run the command succesfully.
If this doesn't work (as you might get the same error running the previous command), try removing the global vendor directory. When running any global Composer command, it outputs something like "Changed current directory to XXX". Remove the XXX/vendor directory and then try running the command.
In addition to #WouterJ answer.
Worst case if the steps provided by #WouterJ did not work, you could manage to uninstall and reinstall composer for windows.
When done, run composer global update to be sure to get latest updates, if there was.
Then run composer global require "laravel/installer=~1.1" and it should works.
Remember to update your windows environment path C:\Users\UserName\AppData\Roaming\Composer\vendor\bin

Manually install Parse PHP SDK without Composer

I've got a client on a shared hosting environment (which I can't change) and I'm needing to install the Parse PHP SDK, but the host won't allow me to install the Composer package manager. Does anyone else know of a manual install method?
If you have wget/unzip available, just download latest release zip (bellow the release, this file).
Use unzip to unpack package and load it with PSR-4 autoloading (the composer's approach).
Composer isn't meant to be an installer, so you are not expected to run Composer on the production machine. What would happen if during your update process Github would be down? No new website version! And maybe also no old version.
Run Composer somewhere else, and then upload the result to the server, after you verified that everything went well.

Resources