Re: [Csnd-dev] unpkg CDN

Steven Yi <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <CANtcCs6oRR3PnDAaPP9C0HcEW+j6xsvi05K-qfuXgoxEgDJuow@mail.gmail.com>
Unsure but you could try the jsdelivr link:

https://cdn.jsdelivr.net/npm/@csound/[email protected]/dist/csound.js

I couldn't load the unpkg one in my browser here but the jsdelivr one
worked.

We could also look at hosting these in a repo and publish on github pages
so that they're always available.

On Wed, Apr 2, 2025 at 10:24 AM Victor Lazzarini <
[email protected]> wrote:

> I am having CORS issues with the unpkg CDN. Does anyone know any
> work-around?
>
> const { Csound } = await import('
> https://www.unpkg.com/@csound/[email protected]/dist/csound.js’);
>
> gives me (running on a locals server, the same running from github pages)
>
> ping_cdn.html:1 Access to script at '
> https://www.unpkg.com/@csound/[email protected]/dist/csound.js' from origin '
> http://127.0.0.1:8080' has been blocked by CORS policy: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
>
> ping_cdn.html:23 GET
> https://www.unpkg.com/@csound/[email protected]/dist/csound.js
> net::ERR_FAILED 525
>
> ping_cdn.html:35 Uncaught (in promise) TypeError: Failed to fetch
> dynamically imported module:
> https://www.unpkg.com/@csound/[email protected]/dist/csound.js
>
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.