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.
This message can be reproduced by checking out the following branch: https://github.com/toolsplus/forge-todo-app/tree/feat/update-nx-forge-1_1_4
After checkout, run npm install
the follow the instructions on the initial build and Forge app registration (replace <forge-app-name>
with forge-app
).
Hi @tbinna !
I am working on reproducing the bug. When I have more details about the message I will get back to you
1 Like
Hi @tbinna ! There are few things:
- I’m unable to reproduce this bug due to installation process. Could you please check if it updated to the lastest forge cli ?
- We recently had an issue that was cousing some trobule during apps deployment in forge. After update this warning should be gone.
I look forward to your reply and best regards,
Jaroslaw
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?
Morning @tbinna
Thanks for reporting this issue.
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).
Hope this helps.
Thanks again,
Xavier
2 Likes
Hey @tbinna, just updating this thread with the latest information. We have since picked up this work and have updated the handler linting step.
This will be included in a coming release of the CLI. I’ll try to update this thread once more when this change is released.
If you have any questions, feel free to ask! Hope this helps.
Regards,
Matthew
1 Like