Skip to content

wp-now: ReferenceError: DOMParser is not defined while installing the plugin #113

@jakubmikita

Description

@jakubmikita

My blueprint:

{
    "$schema": "https://playground.wordpress.net/blueprint-schema.json",
    "landingPage": "/wp-admin/",
    "preferredVersions": {
        "php": "8.0",
        "wp": "latest"
    },
    "steps": [
        {
            "step": "login",
            "username": "admin",
            "password": "password"
        },
        {
            "step": "installPlugin",
            "pluginZipFile": {
                "resource": "wordpress.org/plugins",
                "slug": "notification"
            },
            "options": {
                "activate": true
            }
        }
    ]
}

And the result:

kuba@Kuba:/mnt/c/Users/Kuba/www/now$ wp-now start --blueprint=env.json
Starting the server......
directory: /mnt/c/Users/Kuba/www/now
mode: playground
php: 8.0
wp: latest
WordPress latest folder already exists. Skipping download.
SQLite folder already exists. Skipping download.
blueprint steps: 2
Blueprint step completed: login
Proceeding without the Notification theme. Could not install it in wp-admin. The original error was: ReferenceError: DOMParser is not defined
ReferenceError: DOMParser is not defined
    at S (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/node_modules/@wp-playground/blueprints/index.js:35:3)
    at Module.xe [as installPlugin] (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/node_modules/@wp-playground/blueprints/index.js:351:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async o (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/node_modules/@wp-playground/blueprints/index.js:2044:30)
    at async Object.run (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/node_modules/@wp-playground/blueprints/index.js:2007:21)
    at async yt (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/node_modules/@wp-playground/blueprints/index.js:2079:3)
    at async startWPNow (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/main.js:596:5)
    at async startServer (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/main.js:865:42)
    at async Object.handler (file:///home/kuba/.nvm/versions/node/v20.8.0/lib/node_modules/@wp-now/wp-now/main.js:1037:25)
Blueprint step completed: installPlugin
Server running at http://localhost:8881
spawn xdg-open ENOENT

The plugin can be installed just fine from the wp-admin.

Also looks like there's a small typo:

Proceeding without the Notification theme

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions