ERROR TypeError: Cannot read properties of undefined (reading 'match')
When I try to run any drush command I get an error with the drupal10 recipe.
I get the following error using -vvv option:
lando emitting event ready +7ms
lando emitting event cli-answers +1ms
lando emitting event cli-drush-answers +0ms
lando emitting event cli-run +0ms
lando emitting event cli-drush-run +1ms
lando resolved tooling command drush service to app +2ms
lando emitting event pre-command-runner +0ms
lando emitting event pre-drush +1ms
lando ERROR TypeError: Cannot read properties of undefined (reading 'match')
at parse (/snapshot/cli/node_modules/@lando/core/node_modules/yargs-parser/index.js:154:13)
at Parser (/snapshot/cli/node_modules/@lando/core/node_modules/yargs-parser/index.js:855:16)
at Shell.sh (/snapshot/cli/node_modules/@lando/core/lib/shell.js)
at /snapshot/cli/node_modules/@lando/core/utils/build-docker-exec.js
at /snapshot/cli/node_modules/@lando/core/utils/build-tooling-task.js
at process.processImmediate (node:internal/timers:476:21) +5ms
.lando.yml content:
name: test
recipe: drupal10
config:
webroot: web
Drush version in composer: 11.6.0 Lando version: v3.21.0 All plugin are up to date.
I'm having a similar issue. Drush works fine in my instance but I have some custom tooling set up that looks like this:
theme:
description: Watch for theme changes
env:
SHELL: /bin/sh
cmd:
- node: cd themes/custom/mega-radical-theme && npm install
- node: cd themes/custom/mega-radical-theme && npm run watch
Running lando theme -vvv gives me this:
lando starting bootstrap at level engine... +1ms
lando config bootstrap beginning... +2ms
lando emitting event pre-bootstrap-config +1ms
lando plugin '@lando/core' loaded from /Users/josh/.lando/plugins/@lando/core/index.js +9ms
lando plugin '@lando/healthcheck' loaded from /Users/josh/.lando/plugins/@lando/core/plugins/healthcheck/index.js +1ms
lando plugin '@lando/networking' loaded from /Users/josh/.lando/plugins/@lando/core/plugins/networking/index.js +0ms
lando plugin '@lando/proxy' loaded from /Users/josh/.lando/plugins/@lando/core/plugins/proxy/index.js +1ms
lando plugin '@lando/scanner' loaded from /Users/josh/.lando/plugins/@lando/core/plugins/scanner/index.js +0ms
lando plugin '@lando/sharing' loaded from /Users/josh/.lando/plugins/@lando/core/plugins/sharing/index.js +0ms
lando plugin '@lando/acquia' loaded from /Users/josh/.lando/plugins/@lando/acquia/index.js +1ms
lando plugin '@lando/apache' loaded from /Users/josh/.lando/plugins/@lando/apache/index.js +0ms
lando plugin '@lando/backdrop' loaded from /Users/josh/.lando/plugins/@lando/backdrop/index.js +0ms
lando plugin '@lando/compose' loaded from /Users/josh/.lando/plugins/@lando/compose/index.js +0ms
lando plugin '@lando/dotnet' loaded from /Users/josh/.lando/plugins/@lando/dotnet/index.js +0ms
lando plugin '@lando/drupal' loaded from /Users/josh/.lando/plugins/@lando/drupal/index.js +1ms
lando plugin '@lando/elasticsearch' loaded from /Users/josh/.lando/plugins/@lando/elasticsearch/index.js +0ms
lando plugin '@lando/go' loaded from /Users/josh/.lando/plugins/@lando/go/index.js +0ms
lando plugin '@lando/joomla' loaded from /Users/josh/.lando/plugins/@lando/joomla/index.js +0ms
lando plugin '@lando/lagoon' loaded from /Users/josh/.lando/plugins/@lando/lagoon/index.js +12ms
lando plugin '@lando/lamp' loaded from /Users/josh/.lando/plugins/@lando/lamp/index.js +0ms
lando plugin '@lando/laravel' loaded from /Users/josh/.lando/plugins/@lando/laravel/index.js +1ms
lando plugin '@lando/lemp' loaded from /Users/josh/.lando/plugins/@lando/lemp/index.js +0ms
lando plugin '@lando/mailhog' loaded from /Users/josh/.lando/plugins/@lando/mailhog/index.js +0ms
lando plugin '@lando/mariadb' loaded from /Users/josh/.lando/plugins/@lando/mariadb/index.js +0ms
lando plugin '@lando/mean' loaded from /Users/josh/.lando/plugins/@lando/mean/index.js +0ms
lando plugin '@lando/memcached' loaded from /Users/josh/.lando/plugins/@lando/memcached/index.js +1ms
lando plugin '@lando/mongo' loaded from /Users/josh/.lando/plugins/@lando/mongo/index.js +0ms
lando plugin '@lando/mssql' loaded from /Users/josh/.lando/plugins/@lando/mssql/index.js +0ms
lando plugin '@lando/mysql' loaded from /Users/josh/.lando/plugins/@lando/mysql/index.js +0ms
lando plugin '@lando/nginx' loaded from /Users/josh/.lando/plugins/@lando/nginx/index.js +0ms
lando plugin '@lando/node' loaded from /Users/josh/.lando/plugins/@lando/node/index.js +0ms
lando plugin '@lando/pantheon' loaded from /Users/josh/.lando/plugins/@lando/pantheon/index.js +19ms
lando plugin '@lando/php' loaded from /Users/josh/.lando/plugins/@lando/php/index.js +0ms
lando plugin '@lando/phpmyadmin' loaded from /Users/josh/.lando/plugins/@lando/phpmyadmin/index.js +1ms
lando plugin '@lando/platformsh' loaded from /Users/josh/.lando/plugins/@lando/platformsh/index.js +4ms
lando plugin '@lando/postgres' loaded from /Users/josh/.lando/plugins/@lando/postgres/index.js +0ms
lando plugin '@lando/python' loaded from /Users/josh/.lando/plugins/@lando/python/index.js +1ms
lando plugin '@lando/redis' loaded from /Users/josh/.lando/plugins/@lando/redis/index.js +0ms
lando plugin '@lando/ruby' loaded from /Users/josh/.lando/plugins/@lando/ruby/index.js +0ms
lando plugin '@lando/solr' loaded from /Users/josh/.lando/plugins/@lando/solr/index.js +0ms
lando plugin '@lando/symfony' loaded from /Users/josh/.lando/plugins/@lando/symfony/index.js +0ms
lando plugin '@lando/tomcat' loaded from /Users/josh/.lando/plugins/@lando/tomcat/index.js +0ms
lando plugin '@lando/varnish' loaded from /Users/josh/.lando/plugins/@lando/varnish/index.js +0ms
lando plugin '@lando/wordpress' loaded from /Users/josh/.lando/plugins/@lando/wordpress/index.js +1ms
lando removed duplicate plugin entries %o name=@lando/core, path=/Users/josh/.lando/plugins/@lando/core, type=local +0ms
lando emitting event post-bootstrap-config +0ms
lando building proxy config... +1ms
lando config bootstrap completed. +0ms
lando tasks bootstrap beginning... +0ms
lando emitting event pre-bootstrap-tasks +0ms
lando autoloaded task config +67ms
lando autoloaded task destroy +0ms
lando autoloaded task info +1ms
lando autoloaded task init +4ms
lando autoloaded task list +0ms
lando autoloaded task logs +0ms
lando autoloaded task plugin-add +0ms
lando autoloaded task plugin-login +0ms
lando autoloaded task plugin-logout +1ms
lando autoloaded task plugin-remove +0ms
lando autoloaded task poweroff +0ms
lando autoloaded task rebuild +0ms
lando autoloaded task restart +0ms
lando autoloaded task setup +2ms
lando autoloaded task share +0ms
lando autoloaded task shellenv +0ms
lando autoloaded task ssh +0ms
lando autoloaded task start +0ms
lando autoloaded task stop +0ms
lando autoloaded task update +1ms
lando autoloaded task version +0ms
lando emitting event post-bootstrap-tasks +2ms
lando tasks bootstrap completed. +1ms
lando engine bootstrap beginning... +0ms
lando emitting event pre-bootstrap-engine +0ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/core/scripts to /Users/josh/.lando/scripts and set to mode 755 +20ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/core/plugins/proxy/scripts to /Users/josh/.lando/scripts and set to mode 755 +1ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/core/plugins/sharing/scripts to /Users/josh/.lando/scripts and set to mode 755 +1ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/acquia/scripts to /Users/josh/.lando/scripts and set to mode 755 +2ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/backdrop/scripts to /Users/josh/.lando/scripts and set to mode 755 +1ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/lagoon/scripts to /Users/josh/.lando/scripts and set to mode 755 +1ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/nginx/scripts to /Users/josh/.lando/scripts and set to mode 755 +1ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/pantheon/scripts to /Users/josh/.lando/scripts and set to mode 755 +2ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/php/scripts to /Users/josh/.lando/scripts and set to mode 755 +1ms
lando automoved scripts from /Users/josh/.lando/plugins/@lando/platformsh/scripts to /Users/josh/.lando/scripts and set to mode 755 +2ms
lando emitting event post-bootstrap-engine +0ms
lando engine bootstrap completed. +0ms
lando bootstrap completed. +0ms
lando emitting event post-bootstrap +0ms
lando emitting event almost-ready +0ms
lando using docker-compose /Users/josh/.lando/bin/docker-compose-v2.27.0 +1ms
lando emitting event ready +3ms
lando emitting event cli-answers +0ms
lando emitting event cli-theme-answers +0ms
lando emitting event cli-run +0ms
lando emitting event cli-theme-run +1ms
lando resolved tooling command theme service to undefined +1ms
lando emitting event pre-command-runner +0ms
lando emitting event pre-theme +1ms
lando ERROR TypeError: Cannot read properties of undefined (reading 'match')
at parse (/Users/josh/.lando/plugins/@lando/core/node_modules/yargs-parser/index.js:154:13)
at Parser (/Users/josh/.lando/plugins/@lando/core/node_modules/yargs-parser/index.js:855:16)
at Shell.sh (/Users/josh/.lando/plugins/@lando/core/lib/shell.js:126:35)
at module.exports (/Users/josh/.lando/plugins/@lando/core/utils/build-docker-exec.js:37:25)
at /Users/josh/.lando/plugins/@lando/core/utils/build-tooling-task.js:21:51
at process.processImmediate (node:internal/timers:476:21) +4ms
So same error from the same spot in yargs-parser. Possibly of interest is the fact that this works fine on other sites with the the exact same lando.yml only difference being the paths to the theme.
@soniktrooth You have cmd indented too far. It shouldn't be nested in env.