I am trying to use Spfx form customizer (react) in my portal. I created the form customizer solution and only added hello world in side the default empty div. After deploying the solution to my farm I used the pnpjs to add the customizer to a list as new, edit and display form. When I click new item my custom form opens without an error but when I tried to open edit or display forms it gives an error (Sorry something went wrong) and in the console I am getting the error below
I tried this with multiple solutions but result is always the same. I added console.log for form load to see when is this problem occurs but none of the log texts shown in the console for display and edit form.
Am I missing some configuration or doing something wrong?