-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Dynamic requirements fail #48
Comments
What do you want done here? |
@sindresorhus By any chance would you have the source code to that binary? One of the ways we handle external file requirements is
Then, external file requirements / executions will work :) |
Yes, it's linked to from the readme: https://github.com/sindresorhus/macos-trash
Please clarify. I have no idea what this means. |
When this package is a dependency to a project that is built into a binary, So when I give this built binary package to you, So a workaround is to check if the file exists in a generic path, if it doesn't exist, write the source code to the generic path.
better yet, just download the release package (.zip) from and then, run the build script and now you've binaries at the location you want. :) |
I'm willing to move the require statements to the top as that's a better practice anyways, but I'm not interested in adding lots of workarounds for this. |
First of all, love your module. It's nice and robust, has made our lives easier.
We are trying to package our app in a node binary, saw users can use it without node. Unfortunately due the dynamic requires in your app, the trash functionality doesn't work.
When we bundle our code for production, it gets built to a binary.
Here: https://github.com/sindresorhus/trash/blob/master/index.js#L22-L24
Here: https://github.com/sindresorhus/trash/blob/master/lib/macos.js#L10
etc.
https://github.com/jaredallard/nexe#doesnt-support-dynamic-require-statements
Can you add the source code as part of the package so it can support compiled binaries?
Thanks.
The text was updated successfully, but these errors were encountered: