lando / platformsh

The Official Platform.sh Lando Plugin
https://docs.lando.dev/platformsh
GNU General Public License v3.0
6 stars 4 forks source link

Build failure during psh-open.sh #157

Open xaqrox opened 2 years ago

xaqrox commented 2 years ago

spinning up a new platformsh project with lando using psh's drupal9 template (on an intel mac, lando v3.6.2), and lando start keeps dying during the execution of /etc/platform/commands/open from within psh-open.sh. this is the last error message:


lando         14:13:17 ERROR ==> Error: 2022-04-04 18:13:16,917 root INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    at /snapshot/cli/lib/shell.js
From previous event:
    at Shell.sh (/snapshot/cli/lib/shell.js)
    at Object.dc (/snapshot/cli/lib/bootstrap.js)
    at compose (/snapshot/cli/lib/bootstrap.js)
From previous event:
    at /snapshot/cli/lib/router.js
    at processImmediate (internal/timers.js:464:21)
From previous event:
    at Object.run (/snapshot/cli/lib/router.js)
    at run (/snapshot/cli/lib/engine.js)
    at /snapshot/cli/lib/router.js
From previous event:
    at Object.eventWrapper (/snapshot/cli/lib/router.js)
    at Engine.engineCmd (/snapshot/cli/lib/engine.js)
    at Engine.run (/snapshot/cli/lib/engine.js)
    at /Users/xaq/Code/lando-platformsh/app.js:361:33
    at processImmediate (internal/timers.js:464:21)
From previous event:
    at /Users/xaq/Code/lando-platformsh/app.js:351:32
From previous event:
    at AsyncEvents.<anonymous> (/Users/xaq/Code/lando-platformsh/app.js:345:10)
    at AsyncEvents.handle (/snapshot/cli/lib/events.js)
    at /snapshot/cli/lib/events.js
From previous event:
    at AsyncEvents.emit (/snapshot/cli/lib/events.js)
From previous event:
    at App.start (/snapshot/cli/lib/app.js)
    at /snapshot/cli/lib/app.js
From previous event:
    at App.rebuild (/snapshot/cli/lib/app.js)
    at Object.run (/snapshot/cli/plugins/lando-core/tasks/rebuild.js)
    at /snapshot/cli/lib/cli.js
    at processImmediate (internal/timers.js:464:21)
From previous event:
    at /snapshot/cli/lib/cli.js
From previous event:
    at Object.handler (/snapshot/cli/lib/cli.js)
    at Object.runCommand (/snapshot/cli/node_modules/yargs/lib/command.js:238:44)
    at Object.parseArgs [as _parseArgs] (/snapshot/cli/node_modules/yargs/yargs.js:1063:30)
    at Function.get [as argv] (/snapshot/cli/node_modules/yargs/yargs.js:1004:21)
    at Cli.init (/snapshot/cli/lib/cli.js)
    at Cli.run (/snapshot/cli/lib/cli.js)
From previous event:
    at /snapshot/cli/bin/lando.js
From previous event:
    at Object.<anonymous> (/snapshot/cli/bin/lando.js)
    at Module._compile (pkg/prelude/bootstrap.js:1751:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.runMain (pkg/prelude/bootstrap.js:1804:12)
    at internal/main/run_main_module.js:17:47
xaqrox commented 2 years ago

It appears this is an issue using psh's php8.1 image, my 7.4 projects are not having this problem.

magtak commented 1 year ago

I am also running into this with PHP 8.1 on MacOS - any solution?

Is there any particular way one should install python 2.7 in that location? Brew installed python3 for me and it's not in that location

xaqrox commented 1 year ago

@magtak Yes, actually. Make sure you're using p.sh's "stable" image:

services:
  app:
    overrides:
      image: docker.registry.platform.sh/php-8.1:stable

Various issues (#55, #169, #178) exist around this, search for "stable" or "latest" in this repo. I think it's all waiting on Lando v4 and the switch to different images in general, but this seems to work for now.

magtak commented 1 year ago

Thanks - I managed to fix it but I then switched to ddev and I've had no problems since :)