Getting error "TypeError: fields is not iterable" while running generate:importmap Found a fix! Is it a proper fix ? #11171
Replies: 1 comment 1 reply
-
That shouldn't be necessary. I'd like to know what is in your config that causes fields to not be an array here. If you can narrow it down perhaps there is some extra sanitization or misconfiguration that should throw an error. Can you create a minimal reproduction? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi,
i have a complex setup with custom payload.config path, custom .env paths while running
generate:importmap
i am getting this errori fixed this by modifying this file
payload/packages/payload/src/bin/generateImportMap/iterateFields.ts
Lines 20 to 35 in 6901b26
i just added a conditional return , is it right way to do ? here is my modified code , the error is gone and everything works , just want a feedback on this, if fields can be undefined we need to add this to the core code ?
Beta Was this translation helpful? Give feedback.
All reactions