Laravel giving error "Your lock file does not contain a compatible set of packages. Please run composer update" - laravel

I am trying to host my application using Microsoft Azure. When I build my laravel web to Azure web app, the error I get is "Your lock file does not contain a compatible set of packages. Please run composer update". I have run the command "composer update" but still get the same error.
enter image description here
Does anyone know how to solve this?

You have the solution on your screenshot - enable php extension ext-fileinfo. How? Check documentation
Or, for just test deploy - add flag to install command
composer install --ignore-platform-reqs

Related

Failed to initialize global composer: mac /Sites

Trying to view a local website:
"Uncaught Error: Class 'ComposerAutoloaderInite0e6765..etc' not found in /Users/{ username }/Sites/{ sitename }/htdocs/vendor/twig-autoload.php".
So on into Terminal to do composer dump-autoload. (It worked the first time I did it).
I now get this message:
"The 'git' command requires command line developer tools. Would you like to install the tools now?" (It asks for Xcode)
I click No.
Terminal tells me the file command has been run OK, but no...
Repeating the dump autoload with -vvv reveals the truth:
Failed to initialize global composer: Composer could not find the config file: /Users/{ username }/.composer/composer.json
Searching about, the only things I've found on the composer error seem to be related to Lavarel.
info:
Composer is installed in /Sites/{ sitename }/vendor/
Composer version: 1.10.6
So what I'd like to understand:
Why is composer trying to initialise a 'global composer'? Does it think the locally installed one is global, or could there be another Composer it's trying to default to?
How do I tell composer where the json file is?
What should I do about the xCode message, if anything?
I've reinstalled composer (and Twig - the only package I'm using - seems overkill for one package, but trying out alternatives didn't end well).
The site is now back running (locally).
Still have the issue of xCode request from Terminal, but that's for another question.
So the answer seems to be: Reinstall composer and packages.

error occurred on running composer playground

I had installed my business network and then successfully started it. Then I opened my composer playground from the command line. After opening it is showing the below message what should I do?
This looks like you have installed composer-playground as root or using sudo or su.
The composer install instructions state that you should not use su/sudo.
There is additional information about installing composer in the Knowledge wiki, but if you are having permissions problems trying to install without root/su/sudo please see this link from the npm site.

how to fix error laravel 5.2 "failed to open stream: No such file or directory" without composer

I've got this error in my laravel 5.2 project who hosted in debian linux
Warning: require_once(/home/u706561288/public_html/sap/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
Fatal error: require_once(): Failed opening required '/home/u706561288/public_html/sap/vendor/composer/autoload_real.php' (include_path='.:/opt/alt/php70/usr/share/pear') in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
so many forum like stackoverflow tell me to using php artisan "composer update" but
unfortunately my hosting package not available to composer instalation
please tell me how to fix this problem
I suggest that you test these steps
On the Localhost, run these two commands (composer update and composer dump-autoload)
Re-upload the entire project on the server
Also, if the problem is not resolved, you can delete the ‍Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again.
When the hosting service or some PC does not allow to install Composer and appears error like in my case, follow these steps:
Delete all laravel project in hosting service. I recommend to use smartftp for good speed file access and tracked action.
Back to our localhost project and run composer install --no-scripts command and then composer clearcache.
Reupload all laravel project.
Don't forget to configure .env file.
I hope this can help with the same problem in future.
I had the same error while back, what I did to solve it was. I delete all the vendor folder from the root project then install it back by executing composer install
delete the ‍Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again
this helped me
If anyone still facing the issue after deleting the vendor directory and did composer install try to update your composer by composer selfupdate then do the same install process.

Running symfony3 on Openshift, composer not found

I recently discover OpenShift and look exactly what I needed. Now I'm trying to running a simple symfony3 project on it. I create an application with this cartridge (since I need php 5.5), successfully installed after waiting some minutes ,and then upload a symfony project from my local laptop to the created www folder. Now I'm lost on how to activate composer to install and update vendors.
I read this link, and as it say I create an empty file called use_composer in the marker folder. Then I login with a putty client, go to my project folder(app-root/runtime/repo/www/symfony/), but executing composer install on it give me 'composer: command not found'. I'm sorry if it's a newbie question, but in fact I'm not a linux user. Maybe I need to restart the application or something.
Any help will be appreciated.
I find an answer from this article
Execute curl -s https://getcomposer.org/installer | php -- --quiet --install-dir=$OPENSHIFT_DATA_DIR
Now you can call composer like this php $OPENSHIFT_DATA_DIR/composer.phar update

Using Laravel "Warning:require(C:\wamp\www\laravel\bootstrap/../vendor/autoload.php): failed to open stream: No such

I am new to laravel, composer, and windows terminal. I am trying to setup laravel on my local host. I currently have wamp installed and I have used it before to create basic websites. However, I am now doing a bigger project that needs a framework so I decided to learn Laravel. I installed composer as indicated in the directions, but when i run the command
"C:\wamp\www>composer create-project laravel/laravel laravel"
i generate an error message that says
"[InvalidArgumentException] Project directory laravel/ is not empty."
When I open a browser and navigate to "localhost/laravel/public" I encounter the error message from the title of this thread:
"Warning:require(C:\wamp\www\laravel\bootstrap/../vendor/autoload.php): failed to open stream: No such
I have also added the appropriate environment variables from the composer instructions.
I am really lost at this point, and I have spent the past 4 hours trying to debug this.
I am running Windows 8 x64.
Edit:
I tried running composer install in C:\wamp\www and received an error message
Composer could not find the config file:
C:\ProgramData]ComposerSetup\bin Ti initialize a project, please
create a composer.json file as described in the
http://getcomposer.org/ "Getting Started" section "
The dependencies for your project are not installed. Just download composer from GetComposer.org and install it on your Windows Machine. Then navigate to your project root, you will see a composer.json file there. That file specifies all the dependencies of the project. Run composer update in that directory. Composer will then update or install all required dependencies and your application won't show the error then.
cd \wamp\www\yourproject
composer update
"C:\wamp\www>composer create-project laravel/laravel laravel"
"[InvalidArgumentException] Project directory laravel/ is not empty."
This means C:\wamp\www\laravel already existed when you attempted to run the command. Remove the folder, or change the create-project command to use a different folder name for your new project.
"Warning:require(C:\wamp\www\laravel\bootstrap/../vendor/autoload.php): failed to open stream: No such
You need to do a composer install from C:\wamp\www\laravel.
I figured it out! I was missing a folder called "vendor" and a file inside bootstrap called "compiled.php" Sorry for the inconvenience, and thank you for trying!
use the following command to get vendor folder in your project
composer install --no-scripts
i had the same problem but i just ran this command
composer install
to install all the dependencies

Resources