Closed ecotechie closed 2 weeks ago
@ecotechie what version of wp-now are you using? This looks related to an issue we fixed recently https://github.com/WordPress/playground-tools/pull/169. If you are not using the latest version of wp-now, please update and restart your server.
Transferring this issue to the playground-tools repo where wp-now lives.
@bgrgicak I think version 0.1.70?
[sergio@nixie:/run/media/sergio/neon/var/www/nerdpress]$ nix-shell -p nodePackages_latest.nodejs
[nix-shell:/run/media/sergio/neon/var/www/nerdpress]$ npx @wp-now/wp-now
Need to install the following packages:
@wp-now/wp-now@0.1.70
Ok to proceed? (y)
wp-now <cmd> [args]
But when I run npx @wp-now/wp-now --version
, I get unknown
as output.
I usually check the version using wp-now --version
m same result with npx @wp-now/wp-now --version
.
In the meantime, you can manually fix this by adding the plugin files into /home/sergio/.wp-now/mu-plugins/sqlite-database-integration-main/
Sorry, @bgrgicak not sure what you mean there. The link you shared is to a change log.
Your local setup is missing the sqlite-database-integration plugin. To fix it you could download the latest version of the plugin (ZIP download) and copy the content of that zip into /home/sergio/.wp-now/mu-plugins/sqlite-database-integration-main/
.
This will ensure that when wp-now loads, it will have the plugin available which includes the db.copy
file that caused your error.
Back again... :sweat_smile:
Not sure that's the issue. I've downloaded the latest version of the plugin and replaced it with the existing one.
Still getting the same error:
Also, having the same issue with VS Code and the WordPress Playground Extension...
Any ideas as to why this may be happening?
Hi @ecotechie, I had a NixOS laptop sitting on my desk and was able to run wp-now within a wp-content directory. So... unfortunately, no effortless repro here. :-P
The error message is a bit odd:
Error: Could not mount /home/sergio/.wp-now/mu-plugins/sqlite-database-integration-main/db.copy: Not a directory or a symbolic link to a directory.
because db.copy
is a file, not a directory.
Your latest error message screenshot shows that the line node_modules/@wp-now/wp-now/main.js:840:9
is involved in the error, and in my local copy of @wp-now/now
, that points to this line:
https://github.com/WordPress/playground-tools/blob/e7c9636fbfaa97b525d1a5debbfe68a867ca057b/packages/wp-now/src/wp-now.ts#L378-L381
But why would that lead to an error related to directory mounting?
Here are some questions :
$HOME
indeed point to /home/sergio/
?/run/media/sergio/neon/var/www/nerdpress/
to somwhere under /home/sergio/
and run from there?/
(except /dev
)./run/media/sergio/neon/var/www/nerdpress/wp-content/mu-plugins/sqlite-database-integration-main/
directory? In my testing, wp-now creates that directory but leaves it empty.Thanks @brandonpayton your link to the code solved my issue! It seems that the Query Monitor plugin creates a link to a db.php file in the wp-content directory, and that was causing some issues. I removed the file (link) and now it's working as it should.
lrwxrwxrwx 1 sergio users 69 Mar 18 11:23 db.php -> /var/www/nerdpress/wp-content/plugins/query-monitor/wp-content/db.php
Weird how the db.php
file causes the error complaining about db.copy
. Could this be a bug? I'm not as versed in JS as I'd like to be... :sweat_smile:
Looks like it may have been an older version of the Query Monitor plugin... I updated it and now it's all good. The db.wp is now a directory, by the way :shrug:
Hi, I'm running Linux (NixOS) and am not able to run wp-now in the wp-content directory. I am able to run it just fine in a plugin or theme directory. I guess my goal was to run WordPress with several plugins and themes, so I could do some compatibility testing.
Strangely, if I run
npx @wp-now/wp-now start
inside the WordPress root directory, all the themes and plugins are loaded. So I guess that is good enough for me.What is the expected behavior of
npx @wp-now/wp-now start
in the wp-config directory?