简体   繁体   中英

graph-js-sdk-web.js library not loading from CDN

Microsoft Graph JavaScript library stopped working some time ago (last weekend). I suppose that it is related to the release of the new 2.0.0 version of the library and switch to the new CDN: from unpkg.com to the jsdelivr.net .

We used the following URL to load the library in our project which worked find for us:

https://unpkg.com/@microsoft/microsoft-graph-client/lib/graph-js-sdk-web.js

But now it redirects to a new URL which returns a 404 :

https://unpkg.com/@microsoft/microsoft-graph-client@2.0.0/lib/graph-js-sdk-web.js

It is a breaking change for us and we need to release an updated version to fix the issue. And our customers will need to install an update. That's really bad.

We hope that someone from MS Office developers team will fix the redirection issue.

We expect that https://unpkg.com/@microsoft/microsoft-graph-client/lib/graph-js-sdk-web.js will point to the most recent version in the 1.x branch.

We also posted an issue on GitHub .

If I remember correctly, unpkg.com was never an officially supported CDN (it was certainly not documented anywhere).

If you want to remain on v1.7 provided by unpkg, you can use this URI:

https://unpkg.com/@microsoft/microsoft-graph-client@1.7.0/lib/graph-js-sdk-web.js

You can also get v1.7 from jsdelivr:

https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client@1.7.0/lib/src/index.min.js

There was a rename of the package file during the 2.0 release. It is now called https://unpkg.com/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js We documented this in the release blog post and in the release notes . Sorry for the inconvenience.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM