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

unable to unzip archive (Linux) #5

Open
AndyDv85 opened this issue Feb 28, 2020 · 6 comments
Open

unable to unzip archive (Linux) #5

AndyDv85 opened this issue Feb 28, 2020 · 6 comments

Comments

@AndyDv85
Copy link

Hello, I can’t unzip the zip archive when running under Linux. An error occurs:
/home/andrey/jira/node_modules/7zip-min/index.js:59
proc.stdout.on('data', (chunk) => {
^

TypeError: Cannot read property 'on' of undefined
at run (/home/andrey/jira/node_modules/7zip-min/index.js:59:17)
at Object.unpack (/home/andrey/jira/node_modules/7zip-min/index.js:13:5)
at Object. (/home/andrey/JS/extr_test.js:8:5)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
at internal/main/run_main_module.js:17:11

It seems that the problem is in the 7zip bin unpacker. When working under Windows, all is good.
Can you help me?

@onikienko
Copy link
Owner

Hi @AndyDv85
Do you have this issue for each archive on Linux?
May you pass 7zip-min tests under Linux? (npm test)

@AndyDv85
Copy link
Author

AndyDv85 commented Mar 4, 2020

Hi @onikienko
Yes, I tried a few zip-archives and had same issue.
Honestly, I do not know how to conduct this test correctly. If you help me, I can try.

@onikienko
Copy link
Owner

onikienko commented Mar 4, 2020

@AndyDv85
May you please check what node.js version are you running? To do it put the next command in terminal:

node -v

You may try with a newer node LTS version (>=8)

@AndyDv85
Copy link
Author

AndyDv85 commented Mar 5, 2020

@onikienko
I am working with version 12.0.0

@AndyDv85
Copy link
Author

Hello!
I tried to unpack the same archive under Windows and Linux and then I compared log. Under Windows file was unpacked successfully/ I think problem in unpacker 7za. See attachments.
Windows log.txt
Linux log.txt

@onikienko
Copy link
Owner

Hi @AndyDv85

Unfortunately, I can't reproduce this issue.
May you run the test on your Linux setup? Like this:

# clone repo
git clone https://github.com/onikienko/7zip-min.git
cd 7zip-min
# install dependencies
npm i
# run tests
npm test

And take a look at whether you pass tests.

Also, if possible, may you send me any file you have a problem with. With code fragment where you work with this file.

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

No branches or pull requests

2 participants