Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on lando rebuild with lando 3.17 #200

Closed
sebastienserre opened this issue May 12, 2023 · 2 comments
Closed

Error on lando rebuild with lando 3.17 #200

sebastienserre opened this issue May 12, 2023 · 2 comments
Assignees

Comments

@sebastienserre
Copy link

Hello,

I'm using Lando in the context of my job at Polylang (Multilingual WordPress plugin). When I need to reproduce a customer issue, I'm creating a WordPress website with lando.
The appname is in general the ticket number. Here's a .lando.ymlexample:

name: 23883
recipe: wordpress
config:
  webroot: .
  xdebug: true
  database: mariadb
  php: "8.0"
services:
  pma:
    type: phpmyadmin
    hosts:
      - database
  mailhog:
    type: mailhog
    hogfrom:
    - appserver
  redis:
    type: redis
    portforward: true
tooling:
  composer:
    service: appserver
proxy:
    pma:
      - pma-23883.lndo.site
    mailhog:
      - mailhog-23883.lndo.site
events:
  post-rebuild:
    - appserver: wp core install --url="https://23883.lndo.site" --title="Website ticket-23883" --admin_user="pll-admin" --admin_password="PolylangXXX" --admin_email="seb@test.fr"
    - appserver: wp user update pll-admin --locale=us_US
    - appserver: wp plugin activate all-in-one-wp-migration all-in-one-wp-migration-unlimited-extension
    - appserver: wp plugin update --all
    - appserver: wp theme update --all

Until Lando 3.17 it was working but from my update I've this error:

$ lando rebuild --y
pkg/prelude/bootstrap.js:1930
      return wrapper.apply(this.exports, args);
                     ^

TypeError: undefined is not a function
    at Object.getApp (/snapshot/cli/lib/rts.js)
    at Object.<anonymous> (/snapshot/cli/bin/lando.js)
    at Module._compile (pkg/prelude/bootstrap.js:1930:22)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
    at node:internal/main/run_main_module:17:47

Issue also reported on Slack

@sebastienserre sebastienserre added the bug Something isn't working label May 12, 2023
@pirog pirog self-assigned this May 12, 2023
@pirog pirog transferred this issue from lando/lando May 12, 2023
@pirog pirog added Needs Triage and removed bug Something isn't working labels May 12, 2023
@reynoldsalec
Copy link
Sponsor Member

Note that this issue is caused by the use of an integer value for the app name. A quickfix would be to single quote the appname: name: '23883'

This is a regression that was introduced in the way that Lando retrieves apps and will be fixed in the next Lando release.

reynoldsalec added a commit that referenced this issue May 12, 2023
reynoldsalec added a commit that referenced this issue May 12, 2023
* #200: Accept integer appnames.

* release v3.17.1
@sebastienserre
Copy link
Author

I'm confirming https://github.com/lando/lando/releases/tag/v3.17.1 is solving this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants