I'm desperatly trying to run a friend's laravel program on my PC.
I can run the default Laravel webpage.
I copy and paste the project directory and run composer update or composer install in cmd prompt. Everything here seems to work fine
Then when i try to run this URL http://127.0.0.1/myproject/public/, this error shows:
I already tried to reinstall composer but it doesn't change anything.
Any ideas ?
Edit:
if i run php artisan dump-autoload:
Ensure that you set 777 permission to "storage" and "bootstrap/cache" folders:
There might be some problem in composer.json file. Try to manually check composer. json file and find out which dependency is causing the problem. Also you can try deleting composer.lock file and vendor directory and then running composer install.
Related
My composer update command is returning an error. The problem is coming from vendor folder. I downloaded skeleton project for Symfony 5 and everything seems to be set right.
This is my error in console.
I tried clearing cache folder and deleting vendor folder, than starting command again, but no luck.
Also, when I do composer update --no-scripts as suggested below and docker up the project I get the same error when I try to access it. project browser
welcome on Stackoverflow.
It could happens with some vendor folder when vendor does not implement receipes on flex. Because of error during cache clearing, the composer reinitialized your vendor directory.
You should configure the bundle of vendor. To do that, launch composer update, but do not launch scripts.
composer update --no-scripts
The vendor directory will be copied and won't be anymore deleted.
Then configure the bundle of vendor.
Then execute the cache command manualy.
php bin/console cache:clear
or
symfony console cache:clear
Delete vendor folder
Delete composer.lock
Delete var/cache
Run the composer install command.
If you trying for fresh new pimcore, this might work.
I have a fresh installation of Ubuntu Server 14.04 in which I'm currently trying to install my Laravel project on.
I have moved the entire repository into the folder required, but when I run the command
php artisan
within that directory, the terminal returns an error stating
[InvalidArgumentException]
The "" directory does not exist.
Does anyone know what I can possibly do to solve this issue?
I had this same issue and it turned out that I was not cloning the ./config directory because of a poorly defined .gitignore. So make sure the original project location was able to push that directory up and that it exists in the new location.
After the clone I re-ran composer install and it all worked.
I had been facing the same issue and I found that there was an empty folder in Module Directory. I had just deleted that Module Directory and again started with new Module Directory and it had solved the problem.
Same issue, resolved it by running php artisan config:cache
in my case, i run composer install and it through below error
Problem 1
- lcobucci/jwt is locked to version 4.1.4 and an update of this package was not requested.
then I run
composer update
and it worked like a charm.
I am using windows server 2008 os. i download composer setup.exe and install to my PC . when I try composer install . I getting an error:
'composer' is not recognized as an internal or external command,
eg:-
c:\xampp\htdocs\shop>composer install
'composer' is not recognized as an internal or external command,
operable program or batch file.
My environment variable PATH is shown below:
C:\xampp\php\;C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin
For anyone coming here from Google who are facing the same issue. I just managed to solve this issue after all the other "solutions" other people suggested didn't work.
I installed Composer properly and the Environment variable was set but it just wouldn't work.
In my case composer is installed in C:\ProgramData\ComposerSetup\bin and this is exactly what is in my PATH Environment variable. After messing around a bit trying to fix it I saw that under System variables under PATH there is something called PATHEXT I opened that and added ;.PHAR to the end of it. So it ended up like this:
And this is what my PATH is now:
I closed all file explorer windows and command prompts and started a new CMD and ran composer --version and it worked!
I hope this helps someone facing the same issue as me.
https://getcomposer.org/doc/00-intro.md#installation-windows
Close your current terminal and open a new one.
I had the same problem, I kept repeating the composer installation until it was resolved this way:
1) Download the composer installer (.exe) and put it on C:/XAMPP.
2) Run the installer by just clicking next till the end.
3) Open command-line (cmd) and cd to your project directory (C:/XAMPP/htdocs/myproject) and type composer and see if you have it installed.
4) It should work now, let's say you want to install a PHP framework from your project directory: cmd=>composer require slim/slim "^3.0".
I had the same problem .
In my case i used the command "php composer.phar " instead of "Composer " and it worked .
just paste " echo #php "%~dp0composer.phar" %*>composer.bat " This in your Terminal where you install composer and Boom you get the solution.
The solution is to use complete composer path instead of composer install
eg:- C:\ProgramData\ComposerSetup\bin\composer install" instead of "composer install
Better still, add "C:\ProgramData\ComposerSetup\bin\" to your environment variables, so that you can use "composer install".
If u can't find composer file than follow only 2 steps
1- Download composer file from [https://getcomposer.org/download/]<click on Composer-Setup.exe>
2- Install above file at your project root dir. and give second path is your php.exe file and finally solve this issue.
Simply use
like this
C:\jay\xampp\htdocs\zoho1>php composer.phar require zohocrm/php-sdk
You Just Don't need to worry about this if you have installed composer using Command-line installation than this problem will occurs.
So my suggestion is to download .exe file by visiting this link https://getcomposer.org/
And also after download using this link you don't need to use php composer.phar instead of composer only
I was facing the same issue in installing the composer command in cmd but when I closed all windows file explorers and again run this command "composer global require laravel/installer " from "**https://laravel.com/docs/8.x**". It just installed without any error
remove all your playings with composer path in path variable
go to https://getcomposer.org/doc/00-intro.md#using-the-installer
and find Composer-Setup.exe link to that exe.
I can solve this problem easily without do anything.
Suppose I'm going to create a project in my desktop and facing the problem which you have shown in the description. now follow the step.
Project folder on desktop
Step 1: go you your CMD(Command Prompt) of your Computer
step 2:Select the folder by command here like image (cd/desktop/example folder)
Step 3: After select the folder now write the command which you want to do like screenshot . you can see Im writing the command for laravel.
done, just easy step you can work anything from here and you can see downloading and being prepare for the project
On Ubuntu, when I clone my Laravel 5.0 project from GitHub and then hit "composer install", I get the following result:
I can't see the .env file, but I tried copying .env file from other local project and then I get one error loading blade files using #include():
I tried on Windows too, but is the same result, I notice when I do "git add --all" a warnning message is showed:
I solved the problem, when I run "chmod -R 775 project_name", I had some views errors like:
I fixed the problem changing view path from this "tickets\partials\status" to "tickets/partials/status". I never thought that was the problem, because on Windows run right with this: "tickets\partials\status".
Today, I pulled down the laravel/laravel repository from Github. I then ran php composer.phar install (as I normally would on my system, with a command window in the project directory). However, when I ran php composer.phar update, I received this error:
Everything installed just fine, and Laravel works as it should.
Any ideas what could be causing this issue?
Edit 1
artisan exists in the root of the project, but it throws an exception when I attempt to run php artisan optimize:
Side Note 1
If I try the alternative method (quicker) of installing Laravel (php composer.phar create-project laravel/laravel), I get the following:
Edit 2
Upon installation, I also get the same error, where it claims it cannot find artisan. Therefore, the installation does not fully complete. I believe that it is stopping when it wants to compile classes (or something to that effect), and then write bootstrap/compiled.php. That file doesn't exist.
Here's the snap from the install:
Edit 3
It seems that Composer is looking for artisan in the drive root (C:\). Why is it doing this? Even if I specify -d on the update, it throws the error. (I picked this up from a hunch - simply copied artisan to the root of the drive and it found it - albeit, it obviously did not run...)
Solution Found:
Composer makes calls to php artisan <command> (as per the instruction in composer.json > scripts), but it does not see what directory it is running from (perhaps because it is an external command?).
So, I solved my initial problem by using an absolute path to artisan in composer.json.
Everything is working now. I just wish I knew how to get Composer to know that it is running from C:\LocalServer\lab\laravel, and not just C:\.
As i can see, your artisan file is missing. Can you post the exact steps on how you install it ?
Also, please follow http://laravel.com/docs/installation and http://niallobrien.me/2013/03/installing-and-updating-laravel-4/
I had this problem today too. My laravel folder inside the vendor was deleted after composer update. I ran composer install again and problem resolved.