question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress stdout undefined in upzip.js in unziptool during installation

See original GitHub issue

Current behavior:

Unzip.js fails

/mnt/c/Users/foob/node_modules/cypress/lib/tasks/unzip.js:130
          sp.stdout.on('data', function (data) {
                    ^

TypeError: Cannot read property 'on' of undefined
    at unzipWithUnzipTool (/mnt/c/Users/foob/node_modules/cypress/lib/tasks/unzip.js:130:21)

Desired behavior:

I’d like this to be able to unzip.

Versions

OS: Windows 10 Running WSL Ubuntu 18.04 Node: 10.20.1 npm: 6.9.0 Cypress: 3.8.3

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
gpowers01commented, Mar 12, 2021

I was having the same issue on WSL2 with Ubuntu 18.04 LTS distro.

OS Details: Edition Windows 10 Pro Version 20H2 Installed on ‎2/‎4/‎2021 OS build 19042.867 Experience Windows Feature Experience Pack 120.2212.551.0 Windows 10 Professional

The project currently uses Node v10.19.0.

When trying to install cypress 6.3.0 (defined in package.json, installed with npm install from root of source tree), I would see the same errors as reported above:

/user/srcpathroot/node_modules/cypress/lib/tasks/unzip.js:130
          sp.stdout.on('data', function (data) {
                    ^

TypeError: Cannot read property 'on' of undefined

Looking at the cypress source for unzip.js, it appears to be spawning the system unzip command at unzip.js:102. If the unzip binary is not on the Ubuntu WSL2 distro system or in $PATH, unzipping will fail resulting in the error on unzip.js:130.

The solution for us to continue using Node v10 was to install the unzip apt package in Ubuntu 18.04 LTS WSL2 distribution ( apt install unzip )

Upgrading Node to version greater than v12 also seems to work as previously reported, which does not require installing the unzip apt package.

0reactions
jennifer-shehanecommented, Jul 23, 2020

@xshyne88 We actually only require Node 8 as of today (Cypress 5 will require Node 10+), but I bet we are not testing Node 8 + WSL combo. I opened an issue here to run our min Node version tests on non-Linux machines: https://github.com/cypress-io/cypress-test-node-versions/issues/52

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog - Cypress Documentation
The cy.session() command no longer clears the page between setup and validation and will now always clear the page at the end of...
Read more >
cypress-io/cypress - Gitter
Hi! Does anyone has experience with running cypress as docker in drone ci? My problem is the cypress container is not finding the...
Read more >
unzipping the file using cypress - Stack Overflow
So, I tried all your code you gave above, and it worked perfectly. The only thing I can think if is the contents...
Read more >
RHSA-2021:2438 - Security Advisory - Red Hat 客户门户网站
Details on how to access this content are available at ... BZ - 1904006 - The --dir option doest not work for command...
Read more >
JBrowse 2 guide
How do I install or update the @jbrowse/cli tool . ... and model.track, though track may be undefined if the user closed the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found