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

Fails to load in yarn 2 PnP #1265

Closed
cspotcode opened this issue Dec 9, 2020 · 2 comments · Fixed by #1244
Closed

Fails to load in yarn 2 PnP #1265

cspotcode opened this issue Dec 9, 2020 · 2 comments · Fixed by #1244
Assignees
Labels
Milestone

Comments

@cspotcode
Copy link
Contributor

Describe the bug

@swc/core does not load under yarn 2 PnP.

The root cause is in @node-rs/helpers, but once it's fixed, it will require a tiny code change in @swc/core

Here is a description of the root cause of the failure.
napi-rs/node-rs#263

Once the root cause is fixed, @swc/core will need to adjust it's loadBinding call like this:
https://github.com/swc-project/swc/blob/master/node-swc/src/index.ts#L14

const bindings = loadBinding(__dirname, "swc", "@swc/core", require)

Input code

N/A

Config

N/A

Expected behavior

require('@swc/core') succeeds when installed via yarn PnP.

Version
The version of @swc/core: 1.2.40

Additional context

@cspotcode cspotcode added the C-bug label Dec 9, 2020
@Brooooooklyn
Copy link
Member

I will fix it in #1244

@kdy1 kdy1 mentioned this issue Dec 30, 2020
1 task
@kdy1 kdy1 added this to the v1.2.43 milestone Dec 30, 2020
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 26, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

4 participants