`process.env.STAGEHAND_ENVIRONMENTS.split(',')` fail because `process.env.STAGEHAND_ENVIRONMENTS` is undefined if you haven't set .

You could try using the 'existential' operator: `process.env.STAGEHAND_ENVIRONMENTS?.split(',')`