When I deploy a Forge app I get the following linter warning with no additional information:
Warning: Could not perform some linting actions for HandlerLinter due to unhandled error "Cannot read properties of undefined (reading 'forEach')".
Is there any way to figure out where exactly things are going wrong? I have tried with the --verbose flag with no success. The deployment does actually succeed but the message is irritating. Note that with my current tooling I am deploying a compiled webpack artifact which may be the reason why the linter trips.
Thanks for looking into this @JarosawWitowski. I have just updated my Forge CLI to the latest version 4.3.1 but the warning does not go away.
I do not think that this has anything to do with the Forge deployment. It is a Forge lint issue. If I simply run forge lint I get the same error message.
I’m unable to reproduce this bug due to installation process.
Not sure what you were referring to here. Are you facing any issue with Nx Forge or the reproduction steps?
I was able to reproduce the error on your project branch by following your steps.
From what I can see, I believe the issue in the CLI linter itself, as it cannot resolve the exports of the webpacked file output (coming from dist/apps/forge-app/src/index.js).
Note that as mentioned in the warning, the linter command still performs the other actions (checks against code, manifest content…). However, one specific linter cannot run properly, and this is a bug on our side.
I will create a ticket to follow this up with my team.
In the meantime, you can still run forge lint or forge deploy and it will run properly, just showing you this warning (which you can ignore).