Too many flash-image scripts
Having both https://source.puri.sm/Librem5/librem5-devkit-tools AND https://source.puri.sm/Librem5/librem5-flash-image with both similar but not identical flash scripts is quite confusing, I can tell you. One supports the "--udev" option, the other don't.
One can bum out with "exit(main())" not found (for whatever reason), the other not. One is called ./scripts/flash-image, the other ./scripts/librem5-flash-image and various docs point to either one or the other repo :) (don't ask me from where exactly though, I was googling the official developer docs and browsing that).