If you are using the SvgPublish add-in to export to SharePoint directly, you may face a message "Access Denied", although you have full (owner) access to the target site.
Meaning, after you click "Publish" in the SharePoint export dialog, you get the message:
The error happens after you click the "Publish" button in the SharePoint upload dialog:
The reason for this most probably is the block custom scripts setting. It is turned on by default on all modern SharePoint (or Teams) sites. If you are using SharePoint Online, in particular (group sites, communication sites).
This effectively means that no ".aspx" file can be uploaded there (even manually). To check you could try to upload a file with ".aspx" extension to the site (manually).
Please find more information regarding custom scripts/aspx page drawbacks here:
Enabling custom scripts
Starting with version 1.3, there is an option to enable that automatically for the target site on publishing. You must have the "owner" role for the target site to use this option. If you click "Yes" in the below dialog when prompted, the SvgPublish extension will enable scripts for the target site, and then upload the files:
Another way to enable the user script is to use PowerShell module:
Set-SPOsite $SiteURL -DenyAddAndCustomizePages 0
or SharePoint PnP:
Set-PnpTenantSite -Identity $SiteUURL -DenyAddAndCustomizePages:$false | Out-Null
The setting is per-site.
Native SharePoint web part on the way
Good news: there is a new SvgPublish Web Part in development to provide a simple alternative to the current SharePoint upload.
The web part will also provide most of the options you can configure in Visio, but for a published diagram. Meaning, you will be able to customize look and feel of the "live" diagram already no the SharePoint page, and (optional of course) "full height" sidebar experience.