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.

Control binary download and network access by CLI

See original GitHub issue

Problem

  1. Prisma CLI needs write access for non-existent binaries. I’m using PRISMA_CLI_BINARY_TARGETS="rhel-openssl-1.0.x" npx prisma generate beforehand, but it may not be documented yet anywhere. I’m not desiring installing native binary for decreasing the size of shipping.
  2. Migrate deployments always need network (Internet) access for checking digest sum even if the binary exists.
Error: request to https://binaries.prisma.sh/all_commits/5d491261d382a2a5ffdc71de17072b0e409f1cc1/linux-musl/query-engine.gz.sha256 failed, reason: getaddrinfo EAI_AGAIN binaries.prisma.sh
npm ERR! code ELIFECYCLE
npm ERR! errno 1

Reproduce

No write accesss

chown -R -w node_modules

No network

docker run --rm -it --network none -v $PWD:/tmp/work node:14-alpine /bin/ash
cd /tmp/work
npx prisma deploy --preview-feature

Suggested solution

  1. Add them to document, or add subcommand like prisma download rhel-openssl-1.0.x
  2. Create options like --skip-check-sum, --no-network

Additional context

It’s also nice to set up the route to the Internet, but I’m downloading the binary by prisma generate and carrying it out to the environment right before running migration, so I wish this could be done. ( And it costs setting up just for this purpose… )

Related: https://github.com/prisma/prisma/issues/1383

I encountered the problem while using the serverless model and migration in private network.

Thank you.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
James-Quigleycommented, Aug 25, 2021

I’d like to second a request to enable something like --skip-check-sum, --no-network. I have a usecase where the post install doesn’t have access to the outside internet and therefore fails because it can’t download the checksum.

2reactions
clayrissercommented, Sep 23, 2021

@James-Quigley yes I also have a situation where I need to run this without internet. --no-network would be great

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 2. Installing the CLI by downloading the binary
Installing the CLI on Windows. You can install the OpenShift CLI ( oc ) binary on Windows by using the following procedure. Navigate...
Read more >
Command Line Interface - AWS CLI
With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts....
Read more >
Getting started with the roxctl CLI - OpenShift Documentation
You can install the roxctl CLI by downloading the binary. ... a production environment because each token is assigned specific access control permissions....
Read more >
Command Line Interface (CLI) - Oracle Help Center
The command line interface (CLI) is a tool that enables you to work with ... Managed Access; Management Agent Cloud; Management Dashboard ...
Read more >
Work with CLIs - Akamai TechDocs
With its simple package-management features, Akamai CLI makes it easy to customize your ... Download a release binary compatible with your operating system....
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