Installation failed, deleting composer.json

Installation failed, deleting composer.json

HHVM Version

  • HipHop VM 4.155.0 (rel) (non-lowptr)
  • Compiler: 1648749156_506524366
  • Repo schema: 04d94ff27ad41e22663e624a2fee9a624072160a

Operating System and Version

  • Ubuntu 20.04.4 LTS (VirtualBox guest)
  • Windows 10 64-Bit (host)
  • VirtualBox 6.1.30 r148432
  • VS Code

Standalone code, or other way to reproduce the problem

Following this HHVM tutorial: https://docs.hhvm.com/hack/getting-started/starting-a-real-project

  1. Install Composer and verify it is correctly installed
  2. Run https://docs.hhvm.com/hack/getting-started/starting-a-real-project
  3. Run:
curl https://raw.githubusercontent.com/hhvm/hhast/master/.hhconfig > .hhconfig
mkdir bin src tests
cat > hh_autoload.json
{
  "roots": [
    "src/"
  ],
  "devRoots": [
    "tests/"
  ],
  "devFailureHandler": "Facebook\\AutoloadMap\\HHClientFallbackHandler"
}
  1. CTRL + C to end the write stream to hh_autoload.json
  2. composer require hhvm/hsl hhvm/hhvm-autoload

That is the step where it fails.

Actual result

I can see in VS Code that it begins to create the composer.json file and puts blank braces in the file

{

}

But, after some time waiting for it complete presumably downloading dependencies and repositories required by HHVM, the composer.json file suddenly disappears and then I get the following errors:

Installation failed, deleting ./composer.json.

In RequireCommand.php line 210:

No composer.json present in the current directory (./composer.json), this may be the cause of the following exception.

In RemoteFilesystem.php line 477:

The “https://repo.packagist.org/packages.json” file could not be downloaded: failed to open stream: Connection timed out.

this error occurs when composer can’t access the internet. In order to troubleshoot, try using curl to fetch https://repo.packagist.org/packages.json. In the unlikely case you can fetch this file with curl, but composer is still unable to, you can file an issue against composer/composer.

 

PHP Warning: PHP Startup: Unable to load dynamic library ‘php_imagick’ (tried: C:\xampp\php\ext\php_imagick (The specified module could not be found.), C:\xampp\php\ext\php_php_imagick.dll (The specified module could not be found.)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library ‘php_imagick’ (tried: C:\xampp\php\ext\php_imagick (The specified module could not be found.), C:\xampp\php\ext\php_php_imagick.dll (The specified module could not be found.)) in Unknown on line 0
Info from https://repo.packagist.org: #StandWithUkraine

Installation failed, deleting ./composer.json.

In RequireCommand.php line 210:

No composer.json present in the current directory (./composer.json), this may be the cause of the following excepti
on.

In PackageDiscoveryTrait.php line 312:

Package ahmadmayahi/php-google-vision has requirements incompatible with your PHP version, PHP extensions and Compo
ser version:
– ahmadmayahi/php-google-vision v1.0.0 requires php ^8.0 which does not match your installed version 7.4.14.

require [–dev] [–dry-run] [–prefer-source] [–prefer-dist] [–prefer-install PREFER-INSTALL] [–fixed] [–no-suggest] [–no-progress] [–no-update] [–no-install] [–update-no-dev] [-w|–update-with-dependencies] [-W|–update-with-all-dependencies] [–with-dependencies] [–with-all-dependencies] [–ignore-platform-req IGNORE-PLATFORM-REQ] [–ignore-platform-reqs] [–prefer-stable] [–prefer-lowest] [–sort-packages] [-o|–optimize-autoloader] [-a|–classmap-authoritative] [–apcu-autoloader] [–apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [–] [<packages>…]

 

how to fix No composer.json present in the current directory

C:\Users\admin>composer global require laravel/installer –update-with-all-dependencies
PHP Warning: PHP Startup: Unable to load dynamic library ‘php_imagick’ (tried: C:\xampp\php\ext\php_imagick (The specified module could not be found.), C:\xampp\php\ext\php_php_imagick.dll (The specified module could not be found.)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library ‘php_imagick’ (tried: C:\xampp\php\ext\php_imagick (The specified module could not be found.), C:\xampp\php\ext\php_php_imagick.dll (The specified module could not be found.)) in Unknown on line 0

Composer repair command line : composer global require laravel/installer –update-with-all-dependencies

If you run the script by entering this command line and then download the library you want, it will be done easily.

Composer repair command line : composer global require laravel/installer –update-with-all-dependencies

Leave a Reply

Your email address will not be published. Required fields are marked *