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 cannot server faker 6.0 #635

Closed
jupegarnica opened this issue Mar 19, 2022 · 6 comments · Fixed by #636
Closed

Skypack cannot server faker 6.0 #635

jupegarnica opened this issue Mar 19, 2022 · 6 comments · Fixed by #636
Assignees
Labels
c: bug Something isn't working p: 2-high Fix main branch s: on hold Blocked by something or frozen to avoid conflicts

Comments

@jupegarnica
Copy link

Describe the bug

Skypack cannot server faker 6.0 so, cannot be used from deno

Reproduction

https://cdn.skypack.dev/@faker-js/[email protected]

/*
 * [Package Error] "@faker-js/[email protected]" could not be built. 
 *
 * No build output found.
 *
 * 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] \"@faker-js/[email protected]\" could not be built. ");
throw new Error("[Package Error] \"@faker-js/[email protected]\" could not be built. ");
export default null;

Additional Info

No response

@jupegarnica jupegarnica added the s: pending triage Pending Triage label Mar 19, 2022
@jupegarnica
Copy link
Author

the beta was working fine:

https://cdn.skypack.dev/@faker-js/[email protected]

@Shinigami92 Shinigami92 added c: bug Something isn't working p: 2-high Fix main branch labels Mar 19, 2022
@Shinigami92
Copy link
Member

Yeah I see the error 🤔
I will dig into this and try find out what's different between beta.0 and release

@Shinigami92 Shinigami92 self-assigned this Mar 19, 2022
@Shinigami92 Shinigami92 moved this to In Progress in Faker Roadmap Mar 19, 2022
@Shinigami92
Copy link
Member

Shinigami92 commented Mar 19, 2022

I will compare builds between

https://unpkg.com/@faker-js/[email protected]/package.json and https://unpkg.com/@faker-js/[email protected]/package.json

Edit 1:

except from some chunk names, there is no difference between https://unpkg.com/@faker-js/[email protected]/dist/esm/index.js and https://unpkg.com/@faker-js/[email protected]/dist/esm/index.js

But I'm not sure if skypack uses the esm or cjs version

The cjs variant looks a little bit more differently
So I assume currently that the cjs bundling process was affected by #603 or #618 in one of the esbuild updates

Edit 2:

Oh damn... yeah definitely https://github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01427 broke it!
I will report regression to @evanw

@Shinigami92 Shinigami92 added s: on hold Blocked by something or frozen to avoid conflicts and removed s: pending triage Pending Triage labels Mar 19, 2022
@Shinigami92
Copy link
Member

Shinigami92 commented Mar 19, 2022

I ensured that the cjs version is running locally in my test folder. So this bug only affects skypack somehow 🤔

I added the label s: on hold as an intent to mark this as waiting on upstream. We don't have a label for that (yet) and I'm not sure if we need such a label.

We could downgrade to esbuild 0.14.26, but I would more like to wait on > 0.14.27 as a fix

@hyrious
Copy link

hyrious commented Mar 19, 2022

This might be a skypack issue which depends on the "default" field existing in the export: skypackjs/skypack-cdn#269

As a contrast, esm.sh and esm.run both work fine.

@Shinigami92
Copy link
Member

Perfect, thank you @hyrious
We will update the links in docs to mention this links 👍

@Shinigami92 Shinigami92 linked a pull request Mar 19, 2022 that will close this issue
Repository owner moved this from In Progress to Done in Faker Roadmap Mar 21, 2022
@ST-DDT ST-DDT removed this from Faker Roadmap Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working p: 2-high Fix main branch s: on hold Blocked by something or frozen to avoid conflicts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants