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

Error: 'jw-random' is not a registered wp command #19

Open
thaikolja opened this issue Apr 21, 2020 · 4 comments
Open

Error: 'jw-random' is not a registered wp command #19

thaikolja opened this issue Apr 21, 2020 · 4 comments

Comments

@thaikolja
Copy link

Hi,

The installation fails on my MacBook Pro (macOS 10.15.4). I use the following command to install:

wp package install jaywood/jw-wpcli-random-posts:dev-master

It ends with Success two PHP notices:

Success: Package installed.
PHP Notice:  Trying to access array offset on value of type null in phar:///usr/local/Cellar/wp-cli/2.4.0/bin/wp/vendor/wp-cli/package-command/src/Package_Command.php on line 1244

Notice: Trying to access array offset on value of type null in phar:///usr/local/Cellar/wp-cli/2.4.0/bin/wp/vendor/wp-cli/package-command/src/Package_Command.php on line 1244

The command doesn't register, too:

Error: 'jw-random' is not a registered wp command. See 'wp help' for available commands.

I've tried version 2, but it doesn't help. Any idea how to fix it without digging into wp-cli core files?

@johnchristopher
Copy link

Running into the same error, within docker. I don't have any error upon Installing 2.0 with php -d memory_limit=512M "$(which wp)" package install jaywood/jw-wpcli-random-posts:2.0 though.

Installing package JayWood/jw-wpcli-random-posts (2.0)
Updating /var/www/.wp-cli/packages/composer.json to require the package...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #1)

Dependency resolution completed in 0.603 seconds
Analyzed 1530 packages to resolve dependencies
Analyzed 51336 rules to resolve dependencies
Package operations: 2 installs, 0 updates, 0 removals
Installs: fzaninotto/faker:v1.9.1, JayWood/jw-wpcli-random-posts:2.0
 - Installing fzaninotto/faker (v1.9.1)
 - Warning: JayWood/jw-wpcli-random-posts 2.0 requires fzaninotto/faker ^1.8 -> satisfiable by fzaninotto/faker[1.9.x-dev, v1.8.0, v1.9.0, v1.9.1].
 - Installing JayWood/jw-wpcli-random-posts (2.0)
Writing lock file
Generating autoload files
---
Success: Package installed.

@LudovicFauchet
Copy link

Hello,

Same error here !
No problem in installation but impossible to call the command.

Error: 'jw-random' is not a registered wp command. See 'wp help' for available commands.

Cheers

@jlauding
Copy link

jlauding commented Mar 3, 2021

Same for me:

Error: 'jw-random' is not a registered wp command.

@petertwise
Copy link

Same here.

Installing 2.0 yields Error: 'jw-random' is not a registered wp command.

Installing 1.4 works though.

I'm using

  • PHP 7.4.15
  • WP-CLI 2.4.0
  • WP 5.6.2
  • A whole mess of plugins and I didn't take the time yet to test with everything disabled

Sorry I don't have time to dig in further than that right now...

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