Cannot create property '__layer0__' on string

I’m trying to deploy a nuxt app but i keep getting this error:

2021-09-27T21:51:02Z - internal error - TypeError: Cannot create property '__layer0__' on string ''
    at /var/task/src/lib/OuterEdgeConfig.js:285:26
    at /var/task/node_modules/lodash/lodash.js:4967:15
    at baseForOwn (/var/task/node_modules/lodash/lodash.js:3032:24)
    at /var/task/node_modules/lodash/lodash.js:4936:18
    at Function.forEach (/var/task/node_modules/lodash/lodash.js:9410:14)
    at Function._prepareConfig (/var/task/src/lib/OuterEdgeConfig.js:284:7)

What could cause this?

This ended up being an issue with the layer0.config.js being malformed - there was no key for the “backend” just a domainOrIp and hostHeader under the top level config entry

See here for more details on setting up layer0.config.js Layer0 Documentation - layer0.config.js