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

[Package Error] "[email protected]" could not be built. (Imported by "@octokit/auth-app"). #354

Open
ipselon opened this issue May 18, 2023 · 5 comments

Comments

@ipselon
Copy link

ipselon commented May 18, 2023

/*
 * [Package Error] "[email protected]" could not be built. (Imported by "@octokit/auth-app").
 *
 *   [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/lru-cache/dist/mjs/index.js
 *     Unexpected token (406:4) in lru-cache/dist/mjs/index.js
 *   Install failed.
 *   Install failed.
 *
 * 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] \"[email protected]\" could not be built. (Imported by \"@octokit/auth-app\").\n[1/5] Verifying package is valid…\n[2/5] Installing dependencies from npm…\n[3/5] Building package using esinstall…\nRunning esinstall...\nFailed to load node_modules/lru-cache/dist/mjs/index.js\n  Unexpected token (406:4) in lru-cache/dist/mjs/index.js\nInstall failed.\nInstall failed.");
throw new Error("[Package Error] \"[email protected]\" could not be built. (Imported by \"@octokit/auth-app\").");
export default null;
@gr2m
Copy link

gr2m commented May 19, 2023

This is the line it chokes on for you:
https://unpkg.com/browse/[email protected]/dist/mjs/index.js#L406

The # is a private class field, it's supported since Node 12?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields

Is this a problem with lru-cache or with skypack?

@gr2m
Copy link

gr2m commented May 19, 2023

It seems to be working fine on esm.sh:

https://esm.sh/v122/[email protected]/es2022/lru-cache.mjs

@FrankOVD
Copy link

I have the same issue on Google Chrome v113. I only need to have this line at the beginning of the module.

It used to work just fine.

import { Octokit, App } from "https://cdn.skypack.dev/octokit";

anatawa12 added a commit to anatawa12/vpm.anatawa12.com that referenced this issue May 24, 2023
@whaaaley
Copy link

So does skypack just not work with private classes? Is that the issue here? Using unkpg in the meantime: https://unpkg.com/[email protected]/dist/mjs/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants