Error code 8 causing laser to stop printing mid project

please help. I keep getting error code.

error:8

Grbl ‘$’ command cannot be used unless Grbl is IDLE. Ensures smooth operation during a job.

error:8

Grbl ‘$’ command cannot be used unless Grbl is IDLE. Ensures smooth operation during a job.

How to fix?

Maybe you have some electrical appliance causing electrical noise some heater AC…
Check if this helps: