jw-wpcli-random-posts icon indicating copy to clipboard operation
jw-wpcli-random-posts copied to clipboard

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

Open thaikolja opened this issue 5 years ago • 4 comments

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?

thaikolja avatar Apr 21 '20 15:04 thaikolja

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.

johnchristopher avatar Apr 23 '20 08:04 johnchristopher

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

LudovicFauchet avatar May 05 '20 13:05 LudovicFauchet

Same for me:

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

jlauding avatar Mar 03 '21 10:03 jlauding

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...

petertwise avatar Mar 05 '21 00:03 petertwise