Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package doesn't install with wp package install git@github.com:alwaysblank/blade-generate.git #5

Open
ridgekuhn opened this issue Feb 8, 2020 · 4 comments

Comments

@ridgekuhn
Copy link

The Error

Composer errors out while trying to install blade-generate with the supplied installation command,

# wp package install git@github.com:alwaysblank/blade-generate.git

Error output:

# wp package install git@github.com:alwaysblank/blade-generate.git
Installing package alwaysblank/blade-generate (dev-master)
Updating /home/user/.wp-cli/packages/composer.json to require the package...
Registering git@github.com:alwaysblank/blade-generate.git as a VCS repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Reverted composer.json.
WP-CLI ran out of memory. Please see https://bit.ly/wpclimem for further help.

Replicating the Error

This happened to me on my local macOS and Ubuntu environments, and also my remote Debian environment. The solutions listed at https://bit.ly/wpclimem all seem to deal with memory allocation, but none of them worked for me.

I also tried downloading the package and trying the different options the wp package install command offers:

wp package install <name|git|path|zip>

None of those worked.

Solution?

Finally, I tried installing it to WP-CLI "manually", by requiring the package in ~/.wp-cli/packages/composer.json and adding the GitHub repo as a repository:

{
    "require": {
        "alwaysblank/blade-generate": "dev-master"
    },
    "repositories": {
        "wp-cli": {
            "type": "composer",
            "url": "https://wp-cli.org/package-index/"
        },
        "alwaysblank/blade-generate": {
            "type": "vcs",
            "url": "https://github.com/alwaysblank/blade-generate.git"
        },
    },

Composer returned this lint error:

# composer install
Loading composer repositories with package information
Reading composer.json of alwaysblank/blade-generate (refactor-standards)
Skipped branch refactor-standards, "a2dd1ed3ab743fa933ca2dfaadc507fd665d20d2:composer.json" does not contain valid JSON
Parse error on line 10:
...mand.php" ]        ""    },    "requi
---------------------^
Expected one of: 'EOF', '}', ',', ']'

Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing symfony/finder (v2.7.0): Downloading (100%)         
  - Installing alwaysblank/blade-generate (dev-master 876d495): Cloning 876d49514c from cache
Writing lock file
Generating autoload files

However, the package installed and seems to work okay, so I'm not sure if that error is related to the installation?

# wp blade compile
Finding files...
Compiling templates  100% [========================================] 0:00 / 0:00
Success: Templates rendered!

Finally, a funny story: I was trying to install this package because I was getting a white screen of death on certain pages after pushing new templates for them up to my staging server. After taking a detour to try all the above and get it working, I realized that the real reason the templates weren't rendering was because I forgot to save my work and had uploaded empty template files to the server. 🤣

@ahinkle
Copy link

ahinkle commented Apr 29, 2020

Getting the same error. I'm also getting a memory max on the alternative posted above.

@vburlak
Copy link

vburlak commented Jul 6, 2020

Got the same error with the memory limit.
https://bit.ly/wpclimem — didn't help.

@strarsis
Copy link

What helped for me (general issue):

  1. Determine the path to the packages folder: wp package path
  2. cd to that path
  3. There is a composer.json in that directory, it also has already been updated by wp package install [...].
  4. Invoke composer update, in my case it didn't hang and installed fine.

@ronjak77
Copy link

ronjak77 commented May 5, 2021

For me, from running wp package install git@github.com:alwaysblank/blade-generate.git I got this error:

Installing package alwaysblank/blade-generate (dev-master)
Updating /Users/user/.wp-cli/packages/composer.json to require the package...
Registering git@github.com:alwaysblank/blade-generate.git as a VCS repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in phar:///usr/local/bin/wp/vendor/composer/composer/src/Composer/Json/JsonFile.php on line 272
Reverted composer.json.

I got it to work with the instructions in wp-cli/package-command#69. Basically installed with the command php -d memory_limit=2024M "$(which wp)" package install git@github.com:alwaysblank/blade-generate.git. However, trying to run wp blade clear gives Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in .../site/web/wp/wp-includes/wp-db.php on line 1635, this might be completely unrelated though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants