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.
Hi @n3f !, thanks for reporting. wp-cli is not integrated yet in wp-now, but is something we are planning to support in the next weeks. Once is integrated we can add support for the blueprint "step": "wp-cli".
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 withError: 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: