"Flash device OK: Flash requires modules not present on device"

Flashed working code with minor changes. At some point I received the error:

attempting to flash firmware to your device gm3
Flash device OK: Flash requires modules not present on device

Changed back to previously working code, but still got the same error message.

Put the Photon in Safe Mode, but there was no change. Any ideas of what this could be?

Changed the Photon to a new one. Apparently the Photon stops, blinking green, when flashing DHT22 (temp and humidity sensor) code, using A5 port. Is one of the D-ports required?

How are you flashing?
What device OS version have you got on your device? (check via particle identify and particle serial inspect - both in Listening Mode)
What version are you targeting with your firmware? (if flashing via USB particle binary inspect <yourFirmware.bin> will show)