Hi @john john ,
Based on your description, I did a test in both chrome and edge, using this code can successfully display the list.There should be no issue with this code.
According to your error message, this may be an error in other custom codes on your page. You could try to check AllItems.aspx:64 to get more information.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.