adobe/aio-cli-plugin-app

Pack command failing with "Cannot read properties of undefined (reading 'includes')"

MichaelGoberling opened this issue · 1 comments

Problem

The aio app pack command is failing with the following error:

Error: Cannot read properties of undefined (reading \'includes\')

It seems that the aio api-mesh get command no longer throws an error when there isn't an api mesh configured for the project, it simply returns some text to stderr

So since the execa call doesn't throw, the pack command tries to serialize the stdout as JSON here, fails, and then in the try it looks for err.stderr here, which doesn't exist

Potential Solution

If there's stderr from the call to get the api-mesh, throw it as an error so it can be processed