Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skypack CDN down? #57

Closed
jeroen opened this issue May 30, 2021 · 9 comments
Closed

Skypack CDN down? #57

jeroen opened this issue May 30, 2021 · 9 comments
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects

Comments

@jeroen
Copy link
Contributor

jeroen commented May 30, 2021

Is there some production safe CDN to use rest.js from? Currently my webapp uses the code from the documentation:

<script type="module">
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest@18";

const octokit = new Octokit({
  auth: "mytoken"
});
</script>

But since a few days things stopped working and this returns this js code with:

/*
 * [Package Error] "@octokit/rest@v18.5.5" could not be built. 
 *
 *   [1/5] Verifying package is valid…
 *   [2/5] Installing dependencies from npm…
 *   No matching version found for @octokit/rest@18.5.5.
 *
 * How to fix:
 *   - If you believe this to be an error in Skypack, file an issue here: https://github.com/skypackjs/skypack-cdn/issues
 *   - If you believe this to be an issue in the package, share this URL with the package authors to help them debug & fix.
 *   - Use https://skypack.dev/ to find a web-friendly alternative to find another package.
 */

console.warn("[Package Error] \"@octokit/rest@v18.5.5\" could not be built. \n[1/5] Verifying package is valid…\n[2/5] Installing dependencies from npm…\nNo matching version found for @octokit/rest@18.5.5.");
throw new Error("[Package Error] \"@octokit/rest@v18.5.5\" could not be built. ");
export default null;

Is there a way to use rest.js in webapps that is more production safe?

@jeroen jeroen added the Type: Bug Something isn't working as documented label May 30, 2021
@ghost ghost added this to Bugs in JS May 30, 2021
@rayoray
Copy link

rayoray commented May 31, 2021

yep! noticed this today, received the same error..

@gr2m gr2m added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed Type: Bug Something isn't working as documented labels May 31, 2021
@ghost ghost moved this from Bugs to Support in JS May 31, 2021
@gr2m
Copy link
Contributor

gr2m commented May 31, 2021

I'll check in with the SkyPack folks. For the time being can you explicitly import 18.5.4?

https://cdn.skypack.dev/@octokit/rest@18.5.4

@rayoray
Copy link

rayoray commented Jun 1, 2021

@gr2m thanks ../rest@18.5.4 works

@jeroen
Copy link
Contributor Author

jeroen commented Jun 1, 2021

Yes that works, but meanwhile all webapps that use the documented way to import rest.js are down 😓

gr2m added a commit that referenced this issue Jun 1, 2021
@gr2m
Copy link
Contributor

gr2m commented Jun 1, 2021

I tested with a beta release and that seemed to have worked:
https://cdn.skypack.dev/-/@octokit/rest@v18.5.6-beta.1-qCSdAXeBFn6Ob8CGWAPC/dist=es2020,mode=imports/optimized/@octokit/rest.js

The Skypack folks didn't get back to me yet, I'll do a fix release to hopefully resolve the problem

@gr2m
Copy link
Contributor

gr2m commented Jun 1, 2021

Can you try again? I think the problem should be resolved now

@jeroen
Copy link
Contributor Author

jeroen commented Jun 1, 2021

Yeah it works again now. I'd like to prevent downtime in the future, is it possible to mirror to a stable cdn? Or are there dist bundles available that I can vendor in my app?

@gr2m
Copy link
Contributor

gr2m commented Jun 1, 2021

It was just for this one build, I’ll see if I can add a check post release to see if it failed to prevent that exact problem from happening again.

Mirroring is not easy, it’s not a single file, it still does all the imports to its other dependencies.

We don’t do bundling right now, we did it in the past and it caused to much overhead so we stopped, but we might do it again in future, as release assets

@gr2m gr2m closed this as completed Jun 1, 2021
JS automation moved this from Support to Done Jun 1, 2021
@jeroen
Copy link
Contributor Author

jeroen commented Jun 2, 2021

Ok thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
No open projects
JS
  
Done
Development

No branches or pull requests

3 participants