Skip to content

Installation of prisma2 behind corporate proxy #506

@kaienbcjdoapwkfldue

Description

@kaienbcjdoapwkfldue

I'm running on Ubuntu 18.04 behind a corportate proxy server and proxy variables are properly set in both the shell and npm config.

When I try to npm install -g --unsafe-perm prisma2, I get a timeout error when it tries to download the query- and migration engine during the installation process using the download function of the fetch-engine module. E.g.:

> Downloading linux-glibc-libssl1.1.0 binary [                    ] 0%FetchError: request to https://s3-eu-west-1.amazonaws.com/prisma-native/master/1b0c271f14ca00606f56c93717e228fe48c5603c/linux-glibc-libssl1.1.0/migration-engine.gz failed, reason: connect ETIMEDOUT 52.218.24.18:443
    at ClientRequest.<anonymous> (/home/dmueller/Projects/node_modules/prisma2/download-build/index.js:15010:11)
    at ClientRequest.emit (events.js:203:13)
    at TLSSocket.socketErrorListener (_http_client.js:402:9)
    at TLSSocket.emit (events.js:203:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  message: 'request to https://s3-eu-west-1.amazonaws.com/prisma-native/master/1b0c271f14ca00606f56c93717e228fe48c5603c/linux-glibc-libssl1.1.0/migration-engine.gz failed, reason: connect ETIMEDOUT 52.218.24.18:443',
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  attemptNumber: 1,
  retriesLeft: 1
}

Downloading the dependencies with wget works fine.

Is node-fetch internally used by the downloadZip function not honoring proxy settings?

Is there a workaround to finished the installation process manually?

Edit

After aborting the installation process upon the timout, running prisma init still works. Creating a demo script does not work (No example selected), but I can create a blank project. Manually unzipping prisma.gz and migrations-engine.gz in node_modules/prisma2, making them executable and renaming prisma to query-engine-linux-glibc-libssl1.1.0 allows prisma generate and prisma lift save and prisma lift up to work.

Metadata

Metadata

Assignees

Labels

kind/featureA request for a new feature.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions