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

dlopen: relative path => absolute path #135

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

Maxxxz
Copy link
Contributor

@Maxxxz Maxxxz commented May 23, 2024

This PR contains a:

  • [x ] bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

When require a [.node] file within a [.asar] package, there is an unexpected issue with the Mac system. The error message states:

Error: dlopen(/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node, 0x0001): 
tried: '/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node' (errno=20), 
'/System/Volumes/Preboot/Cryptexes/OS/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node' (no such file),
'/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node'(errno=20)

However, it can be opened when using the absolute path:
/Applications/xx.app/Contents/Resources/app/wrapper.node
To resolve this, I've used path.join to format the path.

similar issue: #132

Breaking Changes

no

Additional Info

Copy link

linux-foundation-easycla bot commented May 23, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can you add a test case?

@Maxxxz
Copy link
Contributor Author

Maxxxz commented May 31, 2024

Looks good, can you add a test case?

Sure, i update the snapshot. it should cover this case.

@SlyryD
Copy link
Contributor

SlyryD commented Sep 28, 2024

This change looks like it would help me too. Please merge!

@alexander-akait alexander-akait merged commit 0507d0b into webpack-contrib:master Oct 14, 2024
3 of 12 checks passed
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

Successfully merging this pull request may close these issues.

4 participants