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.

npm install not working behind corporate firewall

See original GitHub issue

I have troubles installing the npm package behind a corporate firewall due to the download of an executeable included in the post-install of the npm package.

Right now this is how my output looks like:

d:\Workspace\myproj>npm install cypress --save-dev

> cypress@1.0.1 postinstall d:\Workspace\myproj\node_modules\cypress
> node index.js --exec install

Installing Cypress (version: 1.0.1)

 V  Downloaded Cypress
 ×  Unzipping Cypress
   → Cypress Version: 1.0.1
    Finishing Installation
The Cypress App could not be unzipped.

Search for an existing issue or open a GitHub issue at

https://github.com/cypress-io/cypress/issues
----------

Error: end of central directory record signature not found
----------

Probably the downloaded file (zip i guess) gets replaced by a html page of my proxy. therefore the download is successfull, but the unzip fails

I’m hoping for some way to resolve this for all our big banks, goverments and other companies where we don’t blindly trust executables download off the internet.

I don’t know much about the logic behind Cypress, but i noticed the CLI is binary, so if that is the problem, please split the package into 2 different NPM packages. I won’t be needing the CLI anyway.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:26 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
bahmutovcommented, Jun 19, 2018

Please watch https://github.com/cypress-io/cypress-documentation/issues/121 where I will document CYPRESS_BINARY_VERSION variable

5reactions
IcodeNetcommented, Oct 23, 2017

For completeness based on @bahmutov very helpful hint what you need to do (if your network blocks downloads or mess with certificates so that you cannot download from https://) is the following: Download and store somewhere on your network the cypress.zip file. Then expose this file through a URL under https:// Then set either in your environment variables a CYPRESS_BINARY_VERSION=https://someserver/cypress.zip

This is very important as the code that installs cypress has a function that checks if the alternative location for the binary starts with /^https:/

You can also pass at the command prompt the same >set CYPRESS_BINARY_VERSION=https://someserver/cypress.zip&& npm i cypress -D

Ideally this should not be the case as the ceremony is greater than it should. IMHO I think any local path could do such as C:\dev\cypress.zip this way it would be easier to install behind proxies or networks that block zip downloads and point to a local folder. Especially useful for CI servers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running npm behind a corporate firewall: what do I need to ...
Show activity on this post. I am trying to run node. js but cannot install any packages as npm is blocked. I have...
Read more >
How to Setup and Install NodeJS and NPM behind a ...
We need to configure NPM to use proxy with login credentials of your organization; If proxy requires you to authenticate. Fire up command...
Read more >
How to use NPM Install (The Command) behind Corporate ...
This article describes a step by step solution to use NPM install command when you are working behind any corporate proxy server. Problem...
Read more >
Using NPM Install Behind A Corporate Proxy Server - Medium
Go to command prompt or terminal depending on your machine(tip: hit Win + R and type cmd). In the command prompt type the...
Read more >
Guiding NPM Through a Firewall - Beyond Java
If you're experiencing problems with accessing the npm repository, I suggest setting up a corporate npm proxy. Among other things, this improves ...
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