Manually installing laravel/ui results in error - php

I'm trying to install the Laravel/ui package into an existing Laravel 7.28.4 project. I've installed the package on my local machine and uploaded the vendor/laravel/ui and vendor/composer folder manually to the remote server. I've done it this way because my server is a Raspberry PI 3 Model B with 1GB of RAM, composer ran out of memory when I tried installing the package. When I open the website or run any "php artisan" command (On the remote server), I get this error:
RuntimeException
In order to use the Auth::routes() method, please install the laravel/ui package.
What can I do to resolve this problem?

If composer is running out of memory, try running with the memory limit flag.
php -d memory_limit=-1 /usr/local/bin/composer update
You also need to run:
php artisan ui vue --auth

Have you tried delete .php files within bootstrap/cache folder?
Laravel 8 UI issue
I follow watercayman comment its work for me

Related

Laravel 8 - Bootstap ui does not install

In my Laravel 8 application, after installing laravel ui, when I try to run 'php artisan ui bootstrap' I get the following error:
In Bootstrap.php line 70:
copy(C:\xampp\htdocs\netlytics\resources\js/bootstrap.js): Failed to open stream: No such file or directory
I have run composer update successfully.
I have laravel/ui version 3.2.0. I am running Laravel 8.40.0 with PHP 8.0.3.
The site is an old site that I upgraded from Laravel 5.3 and PHP 5.6.
The pre-processing was being done using gulp with a gulpfile.js to configure the mix conversions.
With Laravel 8 I know I need to update my pre-processing to use webpack.mix.js, but so far can't get there.
There is supposed to be a resources/app/bootstrap.js file but it is not showing up and I do not know what it should look like if I wanted to put it there.
Any ideas how to get this installed correctly?
I poked around and finally discovered that I needed to install jQuery and jQuery-ui as well as popper.js. I installed those and again got the same error, but this time I just created a resources/app/bootstrap.js file and when I ran 'php artisan ui bootstrap' it ran and populated the bootstrap.js file.
Here solution:
https://stackoverflow.com/a/68393896/15391779
composer create-project laravel/laravel --prefer-dist laravel-bootstrap
composer require laravel/ui
php artisan ui bootstrap --auth
npm install
npm run dev

Issues using php artisan on a laravel 5.7.* app

I've been trying to work on a laravel app but I can't even make it start.
I've run composer install, composer global update, composer udpate, composer self-update and several other commands,
I've deleted the vendor folder, the composer.lock file, re-ran composer install and things I've found online to no avail. This is the error I keep getting:
#php artisan package:discover
In Container.php line 779:
Class request does not exist
Script #php artisan package:discover handling the post-autoload-dump event returned with error code 1
Not sure where to go next. Any ideas?
I would suggest you remove your composer itself and re-install the composer. the try install you laravel packages with it.
Try clearing application cache using this command: php artisan cache:clear
The cache:clear command can be used to clear the applications cache files.
Don't worry about your laravel
check composer correctly installed on your system
check composer have access for READ and WRITE in your system
after your sure about things
check your laravel install in your system for PHP you have and find specific you php version composer connected to it (Those who have multi PHP)
then have two option:
composer global require laravel/installer
then laravel new blog or
composer create-project --prefer-dist laravel/laravel blog
then go to folder cd /projectName
Use PHP's built-in development server: php artisan serve

How to add /import sample Laravel Project?

After familiar with Codeigniter, I stared to learn Laravel.
I able to install Laravel using following command.
composer create-project --prefer-dist laravel/laravel blog
It works fine. :-)
Next I tried to setup sample Laravel project. I found a sample project from here (https://github.com/evercode1/sample-project).
What I did is I just download it and copied all folders to Xampp htdocs folder.
Then I visit the "http://localhost/sample-project-master/public/".
It gives following error.
Warning:
require(D:\xampp\htdocs\sample-project-master\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
D:\xampp\htdocs\sample-project-master\bootstrap\autoload.php on line
17
Fatal error: require(): Failed opening required
'D:\xampp\htdocs\sample-project-master\bootstrap/../vendor/autoload.php'
(include_path='D:\xampp\php\PEAR') in
D:\xampp\htdocs\sample-project-master\bootstrap\autoload.php on line
17
Have I done mistake when setting up already available Laravel project? How I correct following errors or what is the way to import Laravel project?
You should do:
1) Install composer dependencies
composer install
2) An application key need to be generated with the command
php artisan key:generate
3) Open Project in a Code Editor, rename .env.example to .env and modify DB name, username, password to your environment.
4) Migrate the database along with seed
php artisan migrate --seed
5) Now run the artisan serve command
php artisan serve
the first error is due to not getting file path for bootstrap in bootstrap folder .
you should run: composer install
3 . laravel requires vendor libraries which needs to be install , it does not come automatic with the package . because it's is git ignored . so you need to install it if needed.
You should try this
composer install
OR
composer update --no-scripts
composer update
For more details please follow this link.
This means some dependencies are messing,
Open your project root folder and run this command:
composer install
or
php composer.phar install
I believe below command should work as I have tested on Windows and Linux:
composer update --no-scripts
or if you already installed and updated the composer then check below command:
composer global update
first You have to move the project to www(folder) or htdocs if using xamp or any folder that apache load the files from
then open ur terminal or cmd , and cd untill u reach prject folder , or u can do
shift + right click in the folder , a menu will come up choose "open command window here" .
then write this command composer update this will install all the packages u need to run the project .
dont forget to modify .env file with your database information .
this should work .
You are facing this issue because your system might not have composer.laravel need dependency manager.you have to install the first composer to your htdoc folder.
You can install composer using following this command,composer installNow you can install laravel using (must run this command inside your htdoc)composer global require "laravel/installer"
Now you can create project usinglaravel new YOUR_PROJECT_NAME
OR
composer create-project --prefer-dist laravel/laravel YOUR_PROJECT_NAME
Note : it is good if you install composer and laravel on global location.
Documentation Available Here : https://laravel.com/docs/5.4/installation

laravel failed to open stream fatal error when running php artisan serve command

i had recently installed laravel in windows through composer made a new project named project in my xamp's htdocs folder then run "php artisan serve" comand in cmd but it is giving me error "failed to open stream" here is screenshot here I ran "php artisan serve" comand error is shown in above image I also tried to search my problem on stack overflow but couldn't find any solution that can suit my problem
Most files are missing because you have not successfully installed Laravel.
Go to C:\xampp\htdocs\project> and type composer update --no-scripts or composer install
Since you are using xampp, once all the necessary files and packages are downloaded to your project you should be able to access your site through localhost without running php artisan serve by visiting
http://localhost/project/public
NB:Just ensure xampp is running
please go through the documentation first
https://laravel.com/docs/5.4#installation
you did not installed laravel projects correctly. you did not have vendor files. First you have to run :
composer install
dont need php artisan serve in xampp ... just go to
localhost/your_project/public
hope it helps !!!

Installing Laravel

I am on a windows 8 machine and I'm trying to learn laravel. I copy and pasted my PHP folder from C:\xampp to C:\php, installed composer, ran composer install then composer create-project laravel/laravel learning-laravel. So far everything was created so I went into the directory and tried to use 'php artisan serve' and got the following error.
C:\Users\denni_000\learning-laravel>php artisan serve
Warning: require(C:\Users\denni_000\learning-laravel\bootstrap/../vendor/autoloa
d.php): failed to open stream: No such file or directory in C:\Users\denni_000\l
earning-laravel\bootstrap\autoload.php on line 17
Why you copied php folder
download composer install it.
download laravel latest version and store it on your xampp/htdocs/laravel
and run cmd with composer install command
For more follow install laravel on windows xampp
or Laravel 4.1 installation with composer in xampp
For windows Simply download Laragon which includes latest php 5.6.7, Apache, Mysql, Redis, Memcached an alternative to Xampp or Mamp with small size. Easy to install laravel and create project with auto create virtual host by it. Thank you.
U need to go to the directory where laravel is installed and run the following command.
composer update
Install Laravel 4.2 with composer:
sudo composer.phar create-project laravel/laravel project-directory-name 4.2 --prefer-dist
Here is a different way to setup laravel, may be you guys will like it
Step 1:
Clone https://github.com/laravel/laravel or you may download zip also.
Step 2:
Navigate to downloaded folder in command prompt and run composer install
Step 3:
open the folder and rename .env.example to .env and update the credentials mentioned in file.
Step 4:
After these steps if you navigate to the directory from web-server it will cause an error No supported encrypter found. The cipher and / or key length are invalid. to fix this just run php artisan key:generate
Done!
Hope you guys like this way :)
You need to install all the laravel required dependency.
To do that, you need to tell composer to install everything needed.
Below is the command to use to install that's required in laravel composer.json.
composer install
Follow the installation guide from Laravel
Install Composer:
Like Laravel.com says: "Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable can be located by your system."
Type the following statement in the command line:
composer global require "laravel/installer=~1.1"
Create a fresh Laravel project in a specified directory with the "laravel new" command:
laravel new blog
You can also create a Laravel project using composer, like such:
composer create-project laravel/laravel --prefer-dist
If you want to learn laravel I seriously recommend you use laravel homestead with vagrant.
For this you need to:
Install virtualbox.
Install vagrant.
Install git.
Install ssh.exe (Download msysgit and copy the content of bin folder to git bin folder).
Install Homestead on Vagrant (Follow the steps on laravel/homestead documentation page).
Install Laravel on Homestead (Follow the steps on laravel/installation documentation page).
This method apply to Windows, Linux or Mac, only change the step 4 on linux or mac.

Categories