FatalErrorException in Gettext.php line 187 - laravel-5

I downloaded and installed Laravel 5.0. When creating a clean project with composer, it seems to work all fine, I get a screen that says "LARAVEL" and so on.
Then I forked a repository of a colleague for a website which he has online. But when I try to run that site "as-is" in my environment I first get an error that says undefined function "Illuminate.... and so forth". I updated all dependencies and now the error is gone. Instead I get the following screen:
What does this mean? Google and SO both don't seem to know this error.

Related

Composer - RuntimeException in RootPackageLoader after laminas-migration

I have a strange issue with composer. Having installed as per website docs, and has been working perfectly for days. Updating a zf2 project to laminas. All seemed to be ok after a successful use of laminas-migrate. Updated the new laminas dependencies and was asked to inject Laminas\ComposerAutoloading into my modules.config.php - all ok. After that, i've been getting the following message when i run composer update:
RootPackageLoader.php line 162:
[RuntimeException]
require.laminas/laminas-di is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "^a-z0-9/a-z0-9$".
This even happens if i am in my project dir and run composer -V.
Strangely, if i cd / then run composer -V, i get the correct output (composer version without the RootPackageLoader exception).
I have deleted composer from /usr/local/bin and reinstalled, issue persists.
After a few evenings of going round in circles, i ended up deleting the whole project and starting afresh. This time, there were none of the above issues with laminas-migrate. The only thing i did differently was to run laminas-migrate on the project straight out of the repo, instead of trying to update all the packages to as-close-to-zf3 before migrating to laminas. Seemed to work fine.

Running composer install doesn't resolve undefined type error in cloned Laravel project

I've cloned a Laravel project from Github, then I've run composer install for getting vendor folder. This folder has appeared but I also get weird red lines under each class that show Undefined Type errors. I also deleted the composer.lock and run composer update, but the errors are still there!
Is there any other thing that I should do?
The project was running perfectly, So I found out it was because of my IDE.
The VS Code wanted to validate code using php, and it is not finding php installed.
It's solved by setting php.validate.executablePath in Vs Code setting.
For more information: "Cannot validate the php file. The php program was not found"

How to fix npm Error "timed out" after npm update

We have a React app, based on the Hydrogen theme for Shopify (which uses vite). It was all working ok until I had to add a package and update. It then started giving the following message: Error timed out. That is it, no other error message, I looked in the logs and there was nothing remarkable in there.
I tried removing the package, and all references to it in the code. But it looks like the issue may well have been the update command. But being rather new to React and npm on Windows, I have no idea how to fix it. Things that I did try were clearing the cache using:
npm cache clean --force
Doing another update. Removing the lock file.
Does anyone have a suggestion as to a method to debug that one-line error code, or could point me in the right direction? I am running on localhost, via Windows 10.
npm error timed out image
My problem must have been a broken dependency. After a day or so of trying updates, it eventually just started working again. The update that actually worked had some vulnerabilities, so I ran an:
npm audit fix
After the npm audit fix, the code started running correctly again.

Error on PlugUpdate

I'm currently running on Mac with Neovim and Vim Plug.
Whenever I run the commend :PlugUpdate, I get the following error:
Error detected while processing function <SNR>2_job_handler:
line 19:
E121: Undefined variable: self
I've also tried to update the plugins one by one, and the error still comes up.
And no plugins are updated.
I've tried to update neovim to the latest version as well, yet the error still occur.
Does anyone know where the error comes from?
Turns out it was Vim Plug itself.
I had to run :PlugUpgrade to update Vim Plug, then run :PlugInstall to fix the errors.
Leaving this here for people who will have the same issue. :)

Composer TransportException translation file could not be written

I am installing laravel 4 and running "composer install" command. It was able to install 13 packages successfully, but when it came time to install symfony/translation, it downloaded it 100% and then threw an error:
[Composer\Downloader\TransportException] The "https://api.github.com/repos/symfony/Translation/zipball/6bc4b753c1ae5640c0eacdbe27c04a69cde3d10d" appears broken, and returned an empty 200 response
Could it be because the original is 0 bytes? Is there a work around to installing this package?
Dropping in to confim that I'm seeing this too so I guess I can stop panicking now as it seems to be an error somewhere between Packagist and Github (still a problem to my boss but something to be said for it not being your fault!)
edit: I'm having this issue with kriswallsmith / assetic running Symfony 2.1.9
update: Received an email from Github support indicating this is an issue that they are aware of and are actively looking into it.
I've just added the '--prefer-source' flag until the issue is resolved on their end.
I had this problem for twitter bootstrap:
[Composer\Downloaded\TransportException]
The "https://api.github.com/repos/twitter/bootstrap/zipball/v2.3.1" file could not be written to /my/path/Symfony/vendor/twitter/bootstrap/e01f28f3c03a11c104bae8d4a1b59d21.1:
Doing "composer self-update" changed it to:
[Composer\Downloader\TransportException]
"https://api.github.com/repos/twitter/bootstrap/zipball/v2.3.1" appears broken, and returned an empty 200 response
Using "composer update --prefer-source" seems to have installed it properly.
So it looks like github zip file download is broken.

Resources