Can't ran 'npx prisma init'

See original GitHub issue

Hello! I need some help with installation Prisma.

When I run the command “npx prisma init”, I get an error like this Downloading Prisma engines for Node-API for windows [ ] 0%Error: request to https://binaries.prisma.sh/all_commits/b71d8cb16c4ddc7e3e9821f42fd09b0f82d7934c/windows/migration-engine.exe.gz.sha256 failed, reason: self signed certificate in certificate chain in the console.

I downloaded binaries and ran scripts: "prismaEngine": "set PRISMA_MIGRATION_ENGINE_BINARY=.C:/Users/myPath/migration-engine.exe.gz set PRISMA_INTROSPECTION_ENGINE_BINARY=.C:/Users/myPath/introspection-engine.exe.gz set PRISMA_QUERY_ENGINE_BINARY=.C:/Users/myPath/query_engine.dll.node.gz set PRISMA_FMT_BINARY=.C:/Users/myPath/prisma-fmt.exe.gz"

I get: Process finished with exit code 0

And then I tried to ran “npx prisma init” again. And caught the same error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
eric79commented, Mar 8, 2022

This sounds like a local problem with your environment. Any idea where this self signed certificate comes from?

It is a common corporate IT practice to decrypt/re-encrypt TLS traffic through their proxies so they can inspect packets flowing across the border of their network (for cybersecurity and information security purposes). When they re-encrypt the traffic, they sign the encrypted packet with their own cert.

For all of this to work, software that enforces TLS needs to be configurable such that we can make it aware that there is a new certificate authority (CA) that we want to accept as valid (the CA of the corporation).

Is there a way to configure prisma to accept another CA?

1reaction
eric79commented, Mar 11, 2022

And just to save someone from needing to read through that other thread, here was the answer to my above question:

The way to configure prisma (and many other npm modules) to accept another CA is to set the environment variable NODE_EXTRA_CA_CERTS to the path to your .pem file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - @prisma/client did not initialize yet. Please run " ...
Just add RUN npx prisma generate to your Dockerfile before the build command. This way the files are generated during the image creation...
Read more >
Prisma CLI Installation (Reference)
The Prisma CLI is typically installed as a development dependency, that's why the --save-dev (npm) and --dev (Yarn) options are used in the...
Read more >
How to Build a Fullstack App with Next.js, Prisma, and ...
Create a fullstack application with Next.js, Prisma, PostgreSQL, ... npx prisma init ... If you ran into issue or have any questions about...
Read more >
Introduction to Prisma with Docker | Engineering Education ...
This means that you can't model your data relations, seed, or migrate them. With native drivers, the database connection is natively implemented ...
Read more >
Prisma Overview - API Design in Node.js, v4
The prisma.schema file contains all the schemas for the data models. ... So if you ran prisma init, npx prisma init, you should...
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