studio icon indicating copy to clipboard operation
studio copied to clipboard

Unable use express-proxy with prisma studio

Open natpoint opened this issue 2 years ago • 1 comments

Bug description

Prisma studio is unable connect to the prisma client when run through a proxy

How to reproduce

start server and studio on port 8081 and 4242 respectively

proxy requests to server to studio:

import proxy from 'express-http-proxy'
app.use('/', proxy('localhost:4242'));

Attempt to go to localhost:8081

will receive : Screen Shot 2022-12-19 at 8 08 31 AM

Expected behavior

I expect to be able to view the prisma studio UI on port 8081

Screen Shot 2022-12-19 at 8 13 54 AM

Prisma information

prisma                  : 4.7.1
@prisma/client          : 4.7.1
Current platform        : linux-arm64-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 272861e07ab64f234d3ffc4094e32bd61775599c (at node_modules/@prisma/engines/libquery_engine-linux-arm64-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli 272861e07ab64f234d3ffc4094e32bd61775599c (at node_modules/@prisma/engines/migration-engine-linux-arm64-openssl-1.1.x)
Introspection Engine    : introspection-core 272861e07ab64f234d3ffc4094e32bd61775599c (at node_modules/@prisma/engines/introspection-engine-linux-arm64-openssl-1.1.x)
Format Binary           : prisma-fmt 272861e07ab64f234d3ffc4094e32bd61775599c (at node_modules/@prisma/engines/prisma-fmt-linux-arm64-openssl-1.1.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c
Default Engines Hash    : 272861e07ab64f234d3ffc4094e32bd61775599c
Studio                  : 0.477.0
Preview Features        : interactiveTransactions

Environment & setup

  • OS: Mac
  • Browser: Chrome
  • Database: PostgreSQL

Prisma logs

Error starting Prisma Client: null
Error: Error starting Prisma Client: null
    at qs.init (http://localhost:8081/assets/index.js:1:82942)

natpoint avatar Dec 19 '22 16:12 natpoint