Error on build at _configureExpForAssets

My build was rejected by the app store, who said it crashed on launch. The app runs fine through expo, so I tried a simulator build but it fails with this output:

Checking if there is a build in progress...

Publishing to channel 'default'...
Warning: This project contains unoptimized assets. Please run `expo optimize` in your project directory.
Building iOS bundle
Building Android bundle
Analyzing assets
Uploading assets
No assets to upload, skipped.
Processing asset bundle patterns:
- /Users/TuzMacbookPro2017/Development/QMG-local/APPS/ELECTRO/**/*
Cannot read property 'forEach' of undefined
TypeError: Cannot read property 'forEach' of undefined
    at _configureExpForAssets (/@expo/xdl@55.0.13/src/Project.js:1037:26)

I have no clue what this means, can anyone help? The actual ios build succeeds.

Update: The regular ios build no longer succeeds.

at _configureExpForAssets (/@expo/xdl@55.0.13/src/Project.js:1037:26)

It’s saying it cannot read an object because it doesn’t exist.

The error is pointing to Project.js. Is there a loop function?

I noticed this error but I don’t actually have a Project.js.

I’m not sure what file it’s pointing to, since my project doesn’t have an @expo folder, and even in my node_modules/@expo there is no xdl folder or anything like that (just samples, vector-icons, websql)

Updating to SDK 33 appears to have fixed this, though I’d be interested in knowing more about the problem and why this was the solution.