This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: better support of .node
files
#1321
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@leerob Could you take a look into this please? If it looks ok to you could you also make a patch release? I need this in a project I'm working on, thannks :) |
jesec
reviewed
Sep 30, 2021
Thanks for the review, @jesec! 🙏 |
jesec
approved these changes
Sep 30, 2021
@leerob new patch when possible please 🙏🏼 |
Thank u for this patch. But now i have the following error.
Could you plase help me? |
Fixed on master |
@Grewamor I'm having the same problem, and since I'm using yarn I don't know how can I install it to specific platform and arch, AFAIK yarn makes it impossible to choose |
Any updates on this? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a
.node
file is requiredpkg
copies it in a temporary folder like/tmp/<hash>/addon.node
the problem is that for modules likesharp
this isn't working as them are statically linked to other.so
files using relative paths. This pr will copy the entire module folder inside the temporary directory, this allows also to remove thetryImport
function as there is no reason to try again if that fails.I tested this on my end and it's working
I also grouped all hash folders inside
pkg
folder to be sure that the copy will run when users will update pkg, otherwise the copy may not be done when the folder already exists but was created with a previous pkg versioncc @jesec @leerob @erossignon
Fixes #1075