Skip to content

wp-now: Trying to run a blueprint with wp-cli step fails #267

@n3f

Description

@n3f

TL;DR

I'm looking at adding the ability to test/develop a plugin using wp-now but when I try to include a blueprint with some configuration steps it fails with Error: Could not write to "/wordpress/run-cli.php": There is no such file or directory OR the parent directory does not exist..

Details

From my plugin directory I added this blueprint (it's an example one).

I then ran npx @wp-now/wp-now start --blueprint=./blueprint.json --reset (also ran without --reset).

That command then fails with the following output:

$ npx @wp-now/wp-now start  --blueprint=./blueprint.json --reset
Starting the server......
directory: /Users/brent/tmp/plugin-dir
mode: plugin
php: 8.0
wp: latest
WordPress latest folder already exists. Skipping download.
SQLite folder already exists. Skipping download.
Created a fresh SQLite database and wp-content directory.
blueprint steps: 2
Blueprint step completed: login
Blueprint step completed: writeFile
Error: Could not write to "/wordpress/run-cli.php": There is no such file or directory OR the parent directory does not exist.
    at descriptor.value (/Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@php-wasm/node/index.cjs:72672:17)
    at Object.wpCLI$1 [as wp-cli] (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:1209:87)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async o (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9413:30)
    at async Object.run (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9340:23)
    at async runBlueprintSteps (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9448:3)
    at async startWPNow (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-now/wp-now/main.js:663:5)
    at async startServer (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-now/wp-now/main.js:981:42)
    at async Object.handler (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-now/wp-now/main.js:1167:25) {
  [cause]: [<generic error, no stack>] {
    name: 'ErrnoError',
    node: undefined,
    setErrno: [Function (anonymous)],
    errno: 44,
    message: 'FS error'
  }
}
Error: Error when executing the blueprint step #2 ({"step":"wp-cli","command":"wp post generate --count=12 --post_type=post --post_date=1999-01-04"}) : Could not write to "/wordpress/run-cli.php": There is no such file or directory OR the parent directory does not exist.
    at Object.run (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9343:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runBlueprintSteps (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9448:3)
    ... 2 lines matching cause stack trace ...
    at async Object.handler (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-now/wp-now/main.js:1167:25) {
  [cause]: Error: Could not write to "/wordpress/run-cli.php": There is no such file or directory OR the parent directory does not exist.
      at descriptor.value (/Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@php-wasm/node/index.cjs:72672:17)
      at Object.wpCLI$1 [as wp-cli] (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:1209:87)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async o (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9413:30)
      at async Object.run (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9340:23)
      at async runBlueprintSteps (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-playground/blueprints/index.js:9448:3)
      at async startWPNow (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-now/wp-now/main.js:663:5)
      at async startServer (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-now/wp-now/main.js:981:42)
      at async Object.handler (file:///Users/brent/.npm/_npx/7c65af5c66ec2a7e/node_modules/@wp-now/wp-now/main.js:1167:25) {
    [cause]: [<generic error, no stack>] {
      name: 'ErrnoError',
      node: undefined,
      setErrno: [Function (anonymous)],
      errno: 44,
      message: 'FS error'
    }
  }
}
Failed to start the server: Error when executing the blueprint step #2 ({"step":"wp-cli","command":"wp post generate --count=12 --post_type=post --post_date=1999-01-04"}) : Could not write to "/wordpress/run-cli.php": There is no such file or directory OR the parent directory does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions