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

[BUG]: [Package Error] "@octokit/[email protected]" could not be built. (skypack) #2496

Closed
jehon opened this issue Jul 13, 2023 · 2 comments
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@jehon
Copy link

jehon commented Jul 13, 2023

What happened?

I use octokit by importing it like this:

import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";

The script fail at building:
Unexpected token (13:9) in @octokit/core/dist-web/index.js

If I look at https://cdn.skypack.dev/error/build:@octokit/[email protected], the file is invalid.

Suggestion: test the dist-web before publishing to skypack?

Versions

Octokit latest version from skypack => core v5.0.0 according to the log

I use this in a Firefox 115.0 on windows 10. Reproduced on Chrome and Edge-chrome-stuff.

Relevant log output

In the console, I receive this warning:


[Package Error] "@octokit/[email protected]" could not be built. (Imported by "@octokit/rest").
[1/5] Verifying package is valid…
[2/5] Installing dependencies from npm…
[3/5] Building package using esinstall…
Running esinstall...
Failed to load node_modules/@octokit/core/dist-web/index.js
  Unexpected token (13:9) in @octokit/core/dist-web/index.js
Install failed.
Install failed.

and this error:

Uncaught Error: [Package Error] "@octokit/[email protected]" could not be built. (Imported by "@octokit/rest").
    <anonymous> https://cdn.skypack.dev/error/build:@octokit/[email protected]?from=@octokit/rest:20


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@jehon jehon added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jul 13, 2023
@gr2m
Copy link
Contributor

gr2m commented Jul 13, 2023

We do't publish to skypack, skypack is pulling from the npm registry. Skypack is no longer maintained, please try esm.sh

@jehon
Copy link
Author

jehon commented Jul 13, 2023

Great! it works with esm.sh.... Closing this.

@jehon jehon closed this as completed Jul 13, 2023
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Jul 13, 2023
@wolfy1339 wolfy1339 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 Status: Triage This is being looked at and prioritized labels Jul 13, 2023
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
Archived in project
Development

No branches or pull requests

3 participants