When I tried to open my modern existing library in SharePoint communication site, i found the following error
"unable to get property code' of undefined or null reference in SharePoint library" ,But when i switched to classic mode, it can open .
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Is this working fine before?
Recently Microsoft has done an update on some servers for some tenants. Maybe this is related to that update.
As Mike Smith suggested, you can submit a service request in the Microsoft365 admin center > Support > New service request. The engineers there know more about SharePoint Online, and they may know the cause of your issue.