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

Allow to specify custom paths to all the binaries so it can be used in Electron apps (.asar) #55

Closed
alexhx5 opened this issue Nov 25, 2018 · 5 comments
Assignees

Comments

@alexhx5
Copy link

alexhx5 commented Nov 25, 2018

Right now, when you try to use it in an Electron app you get this error:

Error: spawn 
E:\project-name\node_modules\electron\dist\resources\electron.asar\binaries\win32\7za 
ENOENT

This happens because electron.asar breaks relative paths.

Could you please allow to specify custom paths to all the needed binaries so it can be used in Electron apps (.asar)?

@alexhx5
Copy link
Author

alexhx5 commented Nov 25, 2018

Looks like it's been somewhat done in es-7z module but it throws an undefined error and it no longer maintained.

@q2s2t q2s2t self-assigned this Nov 25, 2018
@q2s2t
Copy link
Owner

q2s2t commented Nov 25, 2018

Hi. It is a popular request and has been added to the master branch.

If you need this feature right now 7784630 is a working version (README not up-to-date but check out the tests for usage.
WARNING
Right now i'm working on the API, so expect breaking changes in the nearby future.

@alexhx5
Copy link
Author

alexhx5 commented Nov 25, 2018

@quentinrossetti thanks mate!

@q2s2t
Copy link
Owner

q2s2t commented Dec 5, 2018

Closed in v1.0.0
Check the README to adapt your code to the new API

@q2s2t q2s2t closed this as completed Dec 5, 2018
@alexhx5
Copy link
Author

alexhx5 commented Dec 5, 2018

@quentinrossetti good job!

I found a problem though:
Importing this module in a Electron-Webpack project results in the following error:

Uncaught TypeError: Cannot destructure property `dir` of 'undefined' or 'null'.

image

Any ideas on why that might be happening? Do you think it's related to that?:
standard-things/esm#97 (comment)

I got that error in a project based on this Electron-Webpack-Vue boilerplate.

But it looks like it DOES work in that Electron-Webpack boilerplate.

@q2s2t q2s2t reopened this Dec 6, 2018
@q2s2t q2s2t closed this as completed in 3c519f6 Dec 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants