Issue starting Lando with Bedrock

I’m trying to follow the instructions provided in this article:

Unfortunately, I run into these errors when running lando start within the bedrock directory:

Let's get this party started! Starting app..
Recreating landoproxyhyperion5000gandalfedition_proxy_1 ... done
error: nginx is a service that does not exist in your app!!!
warn: Try running `lando info` and using one of the services listed there.
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
error: Looks like one of your build steps failed! with Error
    at module.exports.sh.Promise.try.then (/snapshot/lando/build/cli/lib/shell.js:0:0)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
From previous event:
    at Shell.sh (/snapshot/lando/build/cli/lib/shell.js:0:0)
    at Object.exports.dc (/snapshot/lando/build/cli/lib/bootstrap.js:0:0)
    at compose (/snapshot/lando/build/cli/lib/bootstrap.js:0:0)
    at exports.start.datum (/snapshot/lando/build/cli/lib/router.js:0:0)
    at Promise.each.Promise.retry (/snapshot/lando/build/cli/lib/router.js:0:0)
    at Promise.resolve.then.Promise.try (/snapshot/lando/build/cli/lib/promise.js:0:0)
    at rec (/snapshot/lando/build/cli/lib/promise.js:0:0)
    at Promise.resolve.then.Promise.try.fn.catch.Promise.delay.then (/snapshot/lando/build/cli/lib/promise.js:0:0)
    at ontimeout (timers.js:427:11)
    at tryOnTimeout (timers.js:289:5)
warn: This **MAY** prevent your app from working
warn: Check for errors above, fix them, and try again
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
ERROR: The Compose file '/Users/user/.lando/compose/bedrock/theme-3.yml' is invalid because:
Unsupported config option for services.theme: 'services'
error: Error
    at module.exports.sh.Promise.try.then (/snapshot/lando/build/cli/lib/shell.js:0:0)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
From previous event:
    at Shell.sh (/snapshot/lando/build/cli/lib/shell.js:0:0)
    at Object.exports.dc (/snapshot/lando/build/cli/lib/bootstrap.js:0:0)
    at compose (/snapshot/lando/build/cli/lib/bootstrap.js:0:0)
    at exports.start.datum (/snapshot/lando/build/cli/lib/router.js:0:0)
    at Promise.each.Promise.retry (/snapshot/lando/build/cli/lib/router.js:0:0)
    at Promise.resolve.then.Promise.try (/snapshot/lando/build/cli/lib/promise.js:0:0)
    at rec (/snapshot/lando/build/cli/lib/promise.js:0:0)
    at Promise.resolve.then.Promise.try.fn.catch.Promise.delay.then (/snapshot/lando/build/cli/lib/promise.js:0:0)
    at ontimeout (timers.js:427:11)
    at tryOnTimeout (timers.js:289:5)

Does anyone have an idea as to what may be going on here? Below is my .lando.yml config:

name: bedrock
recipe: wordpress
proxy:                
  nginx:              # Optional: if you exclude this, Lando will serve it as bedrock.lndo.site
    - bedrock.test
  theme:              # Optional: add this if you include the Sage specific config down below
    - localhost:3000
config:
  php: '7.2'
  via: nginx
  webroot: web
  database: mariadb
  xdebug: true

# Add the following if you plan to use Sage as a starter theme
services:
  theme:
    type: node
    overrides:
      services:
        ports:
          - 3000:3000
tooling:
  yarn:
    service: theme

I just ran into this issue upgrading from Lando 3.0.0-RC.1 to RC.12 It looks like this particular issue is related to changes introduced in RC.2 and above, specifically for overrides… (see: UPDATING TO 3.0.0-RC.2+)

I believe the guide by @knowler was likely made pre RC.2 as the config described in the guide had been working fine for me on RC.1, but after I upgraded I got the exact same error.

To get past your immediate issue try simply removing the second “services:” line (above ports) in the following bit:

services:
  theme:
    type: node
    overrides:
-      services:
        ports:
          - 3000:3000

That should resolve your immediate error… Hopefully everything else works… as for myself after a full uninstall of RC.1, docker factory reset, and fresh RC.12 install I’m just getting a page that says “File not found.” when trying to visit the dev url. …scratch that, I goofed and had my webroot set to the wrong directory but after correcting the site is at least loading now, but i’m unable to get localhost:3000 to work…

my current .lando.yml for reference is:

name: justiceforkevinbrame
recipe: wordpress
proxy:
  theme:
    - localhost:3000
config:
  php: '7.2'
  via: nginx
  webroot: web
  database: mariadb
  xdebug: true

services:
  theme:
    type: node
    overrides:
        ports:
          - 3000:3000
tooling:
  yarn:
    service: theme

Hope this helps! Tomorrow, I’m going to dig more through the article I linked above and see if I can get a working setup. I’ll be rolling back to RC.1 if I can’t figure anything out quick.

:beers:

2 Likes

Looks like you’ll also need to update the devUrl in config.json from “nginx.yoursite.internal” to “appserver_nginx.yoursite.internal

For myself it also started forcing an https connection which resulted in an error until I updated my config.json’s devUrl and proxyUrl to https:// (after trusing the lando cert)

my current config.json:

{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
  "publicPath": "/app/themes/sage",
- "devUrl": "http://nginx.justiceforkevinbrame.internal",
+ "devUrl": "https://appserver_nginx.justiceforkevinbrame.internal",
- "proxyUrl": "http://localhost:3000",
+ "proxyUrl": "https://localhost:3000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": [
    "app/**/*.php",
    "config/**/*.php",
    "resources/views/**/*.php"
  ]
}

All is working fine for me now.

3 Likes

Thanks for the help, though I’ve decided not to use lando for the time being.

This topic was automatically closed after 42 days. New replies are no longer allowed.