npm install not working behind corporate firewall
See original GitHub issueI 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:
- Created 6 years ago
- Comments:26 (10 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Please watch https://github.com/cypress-io/cypress-documentation/issues/121 where I will document
CYPRESS_BINARY_VERSIONvariableFor 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.zipThis 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 -DIdeally 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.zipthis 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