-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from cypress-io/document-cypress-binary-versi…
…on-121 document CYPRESS_BINARY_VERSION close #121
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,3 +108,28 @@ By installing Cypress through `npm` you also get access to many other CLI comman | |
As of version `0.20.0` Cypress is also a fully baked `node_module` you can require in your node scripts. | ||
|
||
You can {% url 'read more about the CLI here' command-line %}. | ||
|
||
# Advanced installation | ||
|
||
If the normal `npm install cypress` command does not work for some reason (like a corporate proxy not allowing downloading the Cypress binary from the `https://cdn.cypress.io` server), you still have a workaround. The installer can override the version and/or path of the binary to download via the `CYPRESS_BINARY_VERSION` environment variable. You have three choices: | ||
|
||
1. Install a different binary version from the {% url "`cypress` npm package" https://www.npmjs.com/package/cypress %} version. For example, to install the `cypress` npm package version `1.0.3` with the binary `1.0.1` version use this command: | ||
|
||
```shell | ||
CYPRESS_BINARY_VERSION=1.0.1 npm install [email protected] | ||
``` | ||
|
||
2. Install the Cypress binary from the given URL. For example, you can download the Cypress binary from our CDN server `https://download.cypress.io/desktop` and place it on our company's server. Then use the following command: | ||
```shell | ||
CYPRESS_BINARY_VERSION=https://company.domain.com/cypress.zip npm install cypress | ||
``` | ||
3. Download the Cypress binary zip file and install it from a local file. In the example below, we download the version `1.0.2` of the binary for the Mac OS and save it as a local file `cypress.zip`. Then we install the latest `cypress` npm package version and the downloaded zip file. | ||
```shell | ||
curl -O https://cdn.cypress.io/desktop/1.0.2/osx64/cypress.zip | ||
CYPRESS_BINARY_VERSION=cypress.zip npm install cypress | ||
``` | ||
In all cases, the fact that the binary was installed from a custom location *is not saved* in your `package.json` file. Every repeated installation would have to use the same environment variable to install the same binary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters